Initial commit: code as received (Create/Anything export)
Insole-production time tracker exported from the Create/Anything AI platform. Baseline snapshot before any reverse-engineering or cleanup. - apps/mobile: Expo Router app (iOS/Android/web), the only workspace - publisher/: standalone OpenNext/AWS deploy tooling for the web side - Backend (/api/tasks, /api/logs + DB) lives remotely, not in this repo
This commit is contained in:
1
publisher/.yarnrc.yml
Normal file
1
publisher/.yarnrc.yml
Normal file
@@ -0,0 +1 @@
|
||||
nodeLinker: node-modules
|
||||
40
publisher/assert-package-requirements.mjs
Normal file
40
publisher/assert-package-requirements.mjs
Normal file
@@ -0,0 +1,40 @@
|
||||
import { readFileSync } from 'node:fs';
|
||||
|
||||
function readJson(path) {
|
||||
return JSON.parse(readFileSync(path, 'utf8'));
|
||||
}
|
||||
|
||||
function fail(message) {
|
||||
console.error(message);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (!process.env.PUBLISH_PACKAGE_REQUIREMENTS) {
|
||||
fail('PUBLISH_PACKAGE_REQUIREMENTS is required');
|
||||
}
|
||||
|
||||
const publisherPackageJson = readJson(
|
||||
new URL('./package.json', import.meta.url)
|
||||
);
|
||||
const requirements = JSON.parse(process.env.PUBLISH_PACKAGE_REQUIREMENTS);
|
||||
const errors = [];
|
||||
|
||||
for (const sectionName of ['dependencies', 'devDependencies']) {
|
||||
const expectedSection = requirements[sectionName] ?? {};
|
||||
const actualSection = publisherPackageJson[sectionName] ?? {};
|
||||
|
||||
for (const [packageName, expectedVersion] of Object.entries(
|
||||
expectedSection
|
||||
)) {
|
||||
const actualVersion = actualSection[packageName];
|
||||
if (actualVersion !== expectedVersion) {
|
||||
errors.push(
|
||||
`${sectionName}.${packageName}: expected ${expectedVersion}, found ${actualVersion ?? 'missing'}`
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (errors.length > 0) {
|
||||
fail(`Publisher package requirements drifted:\n${errors.join('\n')}`);
|
||||
}
|
||||
11
publisher/package.json
Normal file
11
publisher/package.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "@createinc/anything-publisher",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.1000.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@opennextjs/aws": "3.9.14"
|
||||
},
|
||||
"packageManager": "yarn@4.12.0"
|
||||
}
|
||||
35
publisher/run-next-build.mjs
Normal file
35
publisher/run-next-build.mjs
Normal file
@@ -0,0 +1,35 @@
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { readFileSync } from 'node:fs';
|
||||
|
||||
function getBuildScript() {
|
||||
try {
|
||||
const packageJson = JSON.parse(readFileSync('./package.json', 'utf8'));
|
||||
return typeof packageJson.scripts?.build === 'string'
|
||||
? packageJson.scripts.build
|
||||
: '';
|
||||
} catch {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
const buildScript = getBuildScript();
|
||||
const shouldForceWebpack =
|
||||
/\bnext\s+build\b/.test(buildScript) &&
|
||||
!/\s--(?:webpack|turbopack)(?:\s|$)/.test(buildScript);
|
||||
const args = shouldForceWebpack ? ['build', '--webpack'] : ['build'];
|
||||
|
||||
const result = spawnSync('yarn', args, {
|
||||
stdio: 'inherit',
|
||||
});
|
||||
|
||||
if (result.error) {
|
||||
console.error(result.error);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (result.signal) {
|
||||
console.error(`Build command terminated by ${result.signal}`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
process.exit(result.status ?? 1);
|
||||
2929
publisher/yarn.lock
Normal file
2929
publisher/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user