ugly-app 0.1.317 → 0.1.319

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"deployTar.d.ts","sourceRoot":"","sources":["../../src/cli/deployTar.ts"],"names":[],"mappings":"AAMA,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAEpE;AAED,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAI5E"}
1
+ {"version":3,"file":"deployTar.d.ts","sourceRoot":"","sources":["../../src/cli/deployTar.ts"],"names":[],"mappings":"AAQA,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAEpE;AAED,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAQ5E"}
@@ -1,4 +1,6 @@
1
1
  import { execSync } from 'node:child_process';
2
+ import fs from 'node:fs';
3
+ import path from 'node:path';
2
4
  // macOS BSD tar includes extended attributes (SCHILY.fflags) that cause
3
5
  // warnings when extracted with GNU tar on Linux. Suppress them on macOS.
4
6
  const TAR_FLAGS = process.platform === 'darwin' ? '--no-mac-metadata --no-xattrs' : '';
@@ -6,8 +8,13 @@ export function createTarGz(sourceDir, outPath) {
6
8
  execSync(`tar ${TAR_FLAGS} -czf ${outPath} -C ${sourceDir} .`);
7
9
  }
8
10
  export function createServerTarGz(projectRoot, outPath) {
9
- // Include dist/server, dist/client/index.html (SPA template), and package.json
10
- // JS/CSS assets are served from CDN (R2), not the app server
11
- execSync(`tar ${TAR_FLAGS} -czf ${outPath} -C ${projectRoot} dist/server dist/client/index.html package.json`);
11
+ // Include dist/server, dist/client/index.html (SPA template), package.json,
12
+ // and server/migrations/ (needed for db:migrate at deploy time)
13
+ const migrationsDir = path.join(projectRoot, 'server', 'migrations');
14
+ const hasMigrations = fs.existsSync(migrationsDir);
15
+ const paths = ['dist/server', 'dist/client/index.html', 'package.json'];
16
+ if (hasMigrations)
17
+ paths.push('server/migrations');
18
+ execSync(`tar ${TAR_FLAGS} -czf ${outPath} -C ${projectRoot} ${paths.join(' ')}`);
12
19
  }
13
20
  //# sourceMappingURL=deployTar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deployTar.js","sourceRoot":"","sources":["../../src/cli/deployTar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,wEAAwE;AACxE,yEAAyE;AACzE,MAAM,SAAS,GAAG,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,EAAE,CAAC;AAEvF,MAAM,UAAU,WAAW,CAAC,SAAiB,EAAE,OAAe;IAC5D,QAAQ,CAAC,OAAO,SAAS,SAAS,OAAO,OAAO,SAAS,IAAI,CAAC,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,WAAmB,EAAE,OAAe;IACpE,+EAA+E;IAC/E,6DAA6D;IAC7D,QAAQ,CAAC,OAAO,SAAS,SAAS,OAAO,OAAO,WAAW,kDAAkD,CAAC,CAAC;AACjH,CAAC"}
1
+ {"version":3,"file":"deployTar.js","sourceRoot":"","sources":["../../src/cli/deployTar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,wEAAwE;AACxE,yEAAyE;AACzE,MAAM,SAAS,GAAG,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,EAAE,CAAC;AAEvF,MAAM,UAAU,WAAW,CAAC,SAAiB,EAAE,OAAe;IAC5D,QAAQ,CAAC,OAAO,SAAS,SAAS,OAAO,OAAO,SAAS,IAAI,CAAC,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,WAAmB,EAAE,OAAe;IACpE,4EAA4E;IAC5E,gEAAgE;IAChE,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;IACrE,MAAM,aAAa,GAAG,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACnD,MAAM,KAAK,GAAG,CAAC,aAAa,EAAE,wBAAwB,EAAE,cAAc,CAAC,CAAC;IACxE,IAAI,aAAa;QAAE,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACnD,QAAQ,CAAC,OAAO,SAAS,SAAS,OAAO,OAAO,WAAW,IAAI,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AACpF,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const CLI_VERSION = "0.1.317";
1
+ export declare const CLI_VERSION = "0.1.319";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1,3 +1,3 @@
1
1
  // Auto-generated by prebuild — do not edit manually
2
- export const CLI_VERSION = "0.1.317";
2
+ export const CLI_VERSION = "0.1.319";
3
3
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugly-app",
3
- "version": "0.1.317",
3
+ "version": "0.1.319",
4
4
  "type": "module",
5
5
  "main": "./dist/server/index.js",
6
6
  "exports": {
@@ -1,4 +1,6 @@
1
1
  import { execSync } from 'node:child_process';
2
+ import fs from 'node:fs';
3
+ import path from 'node:path';
2
4
 
3
5
  // macOS BSD tar includes extended attributes (SCHILY.fflags) that cause
4
6
  // warnings when extracted with GNU tar on Linux. Suppress them on macOS.
@@ -9,7 +11,11 @@ export function createTarGz(sourceDir: string, outPath: string): void {
9
11
  }
10
12
 
11
13
  export function createServerTarGz(projectRoot: string, outPath: string): void {
12
- // Include dist/server, dist/client/index.html (SPA template), and package.json
13
- // JS/CSS assets are served from CDN (R2), not the app server
14
- execSync(`tar ${TAR_FLAGS} -czf ${outPath} -C ${projectRoot} dist/server dist/client/index.html package.json`);
14
+ // Include dist/server, dist/client/index.html (SPA template), package.json,
15
+ // and server/migrations/ (needed for db:migrate at deploy time)
16
+ const migrationsDir = path.join(projectRoot, 'server', 'migrations');
17
+ const hasMigrations = fs.existsSync(migrationsDir);
18
+ const paths = ['dist/server', 'dist/client/index.html', 'package.json'];
19
+ if (hasMigrations) paths.push('server/migrations');
20
+ execSync(`tar ${TAR_FLAGS} -czf ${outPath} -C ${projectRoot} ${paths.join(' ')}`);
15
21
  }
@@ -1,2 +1,2 @@
1
1
  // Auto-generated by prebuild — do not edit manually
2
- export const CLI_VERSION = "0.1.317";
2
+ export const CLI_VERSION = "0.1.319";