@fastly/compute-js-static-publish 8.1.0-beta.1 → 8.1.0-beta.3

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.
Files changed (71) hide show
  1. package/DOCUMENTATION.md +38 -36
  2. package/README.md +26 -3
  3. package/README.short.md +26 -3
  4. package/build/cli/cli/commands/manage/clean.d.ts.map +1 -1
  5. package/build/cli/cli/commands/manage/clean.js +2 -1
  6. package/build/cli/cli/commands/manage/collections/delete.d.ts.map +1 -1
  7. package/build/cli/cli/commands/manage/collections/delete.js +3 -2
  8. package/build/cli/cli/commands/manage/collections/index.d.ts.map +1 -1
  9. package/build/cli/cli/commands/manage/collections/index.js +4 -3
  10. package/build/cli/cli/commands/manage/collections/list.d.ts.map +1 -1
  11. package/build/cli/cli/commands/manage/collections/list.js +10 -11
  12. package/build/cli/cli/commands/manage/collections/promote.d.ts.map +1 -1
  13. package/build/cli/cli/commands/manage/collections/promote.js +2 -1
  14. package/build/cli/cli/commands/manage/collections/update-expiration.d.ts.map +1 -1
  15. package/build/cli/cli/commands/manage/collections/update-expiration.js +2 -1
  16. package/build/cli/cli/commands/manage/deploy.d.ts.map +1 -1
  17. package/build/cli/cli/commands/manage/deploy.js +48 -11
  18. package/build/cli/cli/commands/manage/dev.d.ts.map +1 -1
  19. package/build/cli/cli/commands/manage/dev.js +2 -1
  20. package/build/cli/cli/commands/manage/eject.d.ts.map +1 -1
  21. package/build/cli/cli/commands/manage/eject.js +24 -7
  22. package/build/cli/cli/commands/manage/index.d.ts.map +1 -1
  23. package/build/cli/cli/commands/manage/index.js +6 -5
  24. package/build/cli/cli/commands/manage/publish-content.d.ts.map +1 -1
  25. package/build/cli/cli/commands/manage/publish-content.js +9 -5
  26. package/build/cli/cli/commands/manage/status.d.ts.map +1 -1
  27. package/build/cli/cli/commands/manage/status.js +8 -2
  28. package/build/cli/cli/commands/manage/template/index.d.ts.map +1 -1
  29. package/build/cli/cli/commands/manage/template/index.js +2 -1
  30. package/build/cli/cli/commands/manage/template/init.js +3 -3
  31. package/build/cli/cli/commands/manage/upgrade.js +2 -2
  32. package/build/cli/cli/commands/run-dev-watch.d.ts +1 -0
  33. package/build/cli/cli/commands/run-dev-watch.d.ts.map +1 -1
  34. package/build/cli/cli/commands/run-dev-watch.js +45 -9
  35. package/build/cli/cli/commands/scaffold/generate-app.d.ts +8 -3
  36. package/build/cli/cli/commands/scaffold/generate-app.d.ts.map +1 -1
  37. package/build/cli/cli/commands/scaffold/generate-app.js +11 -1
  38. package/build/cli/cli/commands/scaffold/index.d.ts +3 -3
  39. package/build/cli/cli/commands/scaffold/index.d.ts.map +1 -1
  40. package/build/cli/cli/commands/scaffold/index.js +18 -21
  41. package/build/cli/cli/hono/build.d.ts.map +1 -1
  42. package/build/cli/cli/hono/build.js +2 -1
  43. package/build/cli/cli/managed/app.d.ts +1 -1
  44. package/build/cli/cli/managed/app.d.ts.map +1 -1
  45. package/build/cli/cli/managed/app.js +5 -3
  46. package/build/cli/cli/managed/command-helpers.js +2 -2
  47. package/build/cli/cli/managed/lockfile.js +1 -1
  48. package/build/cli/cli/managed/project-file.d.ts.map +1 -1
  49. package/build/cli/cli/managed/project-file.js +4 -3
  50. package/build/cli/cli/util/config.d.ts.map +1 -1
  51. package/build/cli/cli/util/config.js +9 -0
  52. package/build/cli/cli/util/global-options.js +1 -1
  53. package/build/cli/cli/util/package.d.ts +4 -0
  54. package/build/cli/cli/util/package.d.ts.map +1 -1
  55. package/build/cli/cli/util/package.js +43 -0
  56. package/build/cli/cli/util/s3.d.ts +10 -4
  57. package/build/cli/cli/util/s3.d.ts.map +1 -1
  58. package/build/cli/cli/util/s3.js +13 -35
  59. package/build/cli/models/config/publish-content-config.d.ts +1 -0
  60. package/build/cli/models/config/publish-content-config.d.ts.map +1 -1
  61. package/build/cli/models/server/index.d.ts +2 -0
  62. package/build/cli/models/server/index.d.ts.map +1 -1
  63. package/build/cli/models/server/index.js +13 -1
  64. package/build/server/models/config/publish-content-config.d.ts +1 -0
  65. package/build/server/models/config/publish-content-config.d.ts.map +1 -1
  66. package/build/server/models/server/index.d.ts +2 -0
  67. package/build/server/models/server/index.d.ts.map +1 -1
  68. package/build/server/models/server/index.js +13 -1
  69. package/package.json +1 -1
  70. package/resources/app/publish-content.config.js.njk +1 -0
  71. package/resources/templates/plain/src/index.js +12 -2
@@ -14,7 +14,8 @@ import { loadApiToken } from '../../util/api-token.js';
14
14
  import { parseCommandLine } from '../../util/args.js';
15
15
  import { detectProjectMode } from '../../util/config.js';
16
16
  import { readServiceId } from '../../util/fastly-toml.js';
17
- import { getOwnPackageDir, getOwnVersion } from '../../util/package.js';
17
+ import { cliCommand, getOwnPackageDir, getOwnVersion } from '../../util/package.js';
18
+ import { appFastlyCommand } from '../run-dev-watch.js';
18
19
  import { fail, isJsonMode, isNonInteractive, recordFailure, setJsonResult } from '../../util/output.js';
19
20
  import { loadServiceId } from '../../util/service-id.js';
20
21
  import { isS3StorageConfigRc } from '../../../models/config/static-publish-rc.js';
@@ -23,7 +24,7 @@ function help() {
23
24
  console.log(`\
24
25
 
25
26
  Usage:
26
- npx @fastly/compute-js-static-publish deploy [options]
27
+ ${cliCommand()} deploy [options]
27
28
 
28
29
  Description:
29
30
  Deploys the app of a managed project, only if it changed: generates the app,
@@ -31,10 +32,13 @@ Description:
31
32
  'fastly compute deploy'. The comment of the new service version has the
32
33
  fingerprint of the app, so that 'status' and the next deploy can compare it.
33
34
 
34
- After the first deploy, the Service ID is written into managed.serviceId in
35
- ${PROJECT_FILE_NAME}.
35
+ After the first deploy, which makes a new service, the Service ID is written
36
+ into managed.serviceId in ${PROJECT_FILE_NAME}. A Service ID from
37
+ --fastly-service-id or FASTLY_SERVICE_ID does not change the file.
36
38
 
37
- In an ejected app, this runs 'fastly compute publish'.
39
+ In an ejected app, this runs 'fastly compute publish', with --comment,
40
+ --fastly-service-id (as --service-id), and --fastly-api-token. --force and
41
+ --auto-upgrade are only for a managed project.
38
42
 
39
43
  Options:
40
44
  --force Deploy also when the fingerprint did not change.
@@ -52,8 +56,7 @@ Global Options:
52
56
  `);
53
57
  }
54
58
  function runFastly(appDir, args, apiToken) {
55
- const appFastly = path.resolve(appDir, 'node_modules/.bin/fastly');
56
- const fastly = fs.existsSync(appFastly) ? appFastly : 'fastly';
59
+ const fastly = appFastlyCommand(appDir);
57
60
  console.log(`▶️ fastly ${args.join(' ')}`);
58
61
  return child_process.spawnSync(fastly, args, {
59
62
  cwd: appDir,
@@ -86,7 +89,32 @@ export async function action(actionArgs) {
86
89
  fail('json-not-supported', `--json is not supported for 'deploy' in an ejected app.`);
87
90
  return;
88
91
  }
89
- const result = child_process.spawnSync('fastly', ['compute', 'publish'], { stdio: 'inherit' });
92
+ // fastly compute publish always builds and deploys, and an ejected app has
93
+ // no managed.staticPublishVersion.
94
+ for (const [option, value] of [['--force', force], ['--auto-upgrade', autoUpgrade]]) {
95
+ if (value) {
96
+ fail('usage', `${option} is only for a managed project. In an ejected app, deploy runs 'fastly compute publish', which always deploys.`);
97
+ return;
98
+ }
99
+ }
100
+ const publishArgs = ['compute', 'publish'];
101
+ if (typeof comment === 'string' && comment !== '') {
102
+ publishArgs.push('--comment', comment);
103
+ }
104
+ if (typeof fastlyServiceId === 'string' && fastlyServiceId !== '') {
105
+ publishArgs.push('--service-id', fastlyServiceId);
106
+ }
107
+ if (isNonInteractive()) {
108
+ publishArgs.push('--non-interactive');
109
+ }
110
+ const env = typeof fastlyApiToken === 'string' && fastlyApiToken !== '' ?
111
+ { ...process.env, FASTLY_API_TOKEN: fastlyApiToken } :
112
+ process.env;
113
+ console.log(`▶️ fastly ${publishArgs.join(' ')}`);
114
+ const result = child_process.spawnSync(appFastlyCommand(path.resolve()), publishArgs, {
115
+ env,
116
+ stdio: [isNonInteractive() ? 'ignore' : 'inherit', 'inherit', 'inherit'],
117
+ });
90
118
  if (result.error != null || result.status !== 0) {
91
119
  fail('deploy-failed', `'fastly compute publish' failed.`);
92
120
  }
@@ -126,7 +154,8 @@ export async function action(actionArgs) {
126
154
  console.warn(`⚠️ This CLI runs from the npx cache. The paths of the cache (in your home directory) go into the deployed Wasm binary.`);
127
155
  console.warn(` * Add @fastly/compute-js-static-publish as a dev dependency of the project, and run it from there.`);
128
156
  }
129
- const { fingerprint } = await managedAppState(path.resolve(), project);
157
+ const state = await managedAppState(path.resolve(), project);
158
+ const { fingerprint } = state;
130
159
  const staticPublishVersion = getOwnVersion();
131
160
  if (serviceId != null && !force) {
132
161
  const active = await getActiveVersion(context, serviceId);
@@ -145,7 +174,7 @@ export async function action(actionArgs) {
145
174
  return;
146
175
  }
147
176
  }
148
- const { appDir } = await prepareManagedApp(path.resolve(), project);
177
+ const { appDir } = await prepareManagedApp(path.resolve(), project, state);
149
178
  const build = runFastly(appDir, ['compute', 'build'], apiToken.apiToken);
150
179
  if (build.error != null || build.status !== 0) {
151
180
  fail('deploy-failed', `'fastly compute build' failed.`);
@@ -169,7 +198,15 @@ export async function action(actionArgs) {
169
198
  fail('deploy-failed', 'The deploy finished, but the Service ID is not known.');
170
199
  return;
171
200
  }
172
- if (project.managed.serviceId == null) {
201
+ // Write the Service ID into the project file only when it is the service of
202
+ // the project: a new service, or the one in the fastly.toml of the generated
203
+ // app. A Service ID from --fastly-service-id or FASTLY_SERVICE_ID is for this
204
+ // deploy only, so it does not change the committed file.
205
+ const oneOff = serviceIdResult?.source === 'commandline' || serviceIdResult?.source === 'env';
206
+ if (project.managed.serviceId == null && oneOff) {
207
+ console.log(` * managed.serviceId is not set. The Service ID ${serviceId} came from ${serviceIdResult.source === 'env' ? 'FASTLY_SERVICE_ID' : '--fastly-service-id'}, so ${PROJECT_FILE_NAME} was not changed.`);
208
+ }
209
+ if (project.managed.serviceId == null && !oneOff) {
173
210
  const projectFilePath = path.resolve(PROJECT_FILE_NAME);
174
211
  const updated = writeBackServiceId(fs.readFileSync(projectFilePath, 'utf-8'), serviceId);
175
212
  if (updated != null) {
@@ -1 +1 @@
1
- {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/manage/dev.ts"],"names":[],"mappings":"AA+CA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAwChD"}
1
+ {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/manage/dev.ts"],"names":[],"mappings":"AAgDA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAwChD"}
@@ -9,11 +9,12 @@ import { fail, recordFailure } from '../../util/output.js';
9
9
  import { checkVersionForCommand, loadManagedProject, showTemplateFolderHint } from '../../managed/command-helpers.js';
10
10
  import { PROJECT_FILE_NAME } from '../../../models/config/static-publish-project.js';
11
11
  import { serveApp } from '../run-dev-watch.js';
12
+ import { cliCommand } from '../../util/package.js';
12
13
  function help() {
13
14
  console.log(`\
14
15
 
15
16
  Usage:
16
- npx @fastly/compute-js-static-publish dev [-- <options of fastly compute serve>]
17
+ ${cliCommand()} dev [-- <options of fastly compute serve>]
17
18
 
18
19
  Description:
19
20
  Runs the app of a managed project on your computer. Generates the app in
@@ -1 +1 @@
1
- {"version":3,"file":"eject.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/manage/eject.ts"],"names":[],"mappings":"AA+DA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAoHhD"}
1
+ {"version":3,"file":"eject.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/manage/eject.ts"],"names":[],"mappings":"AAyEA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBA6HhD"}
@@ -14,17 +14,17 @@ import { parseCommandLine } from '../../util/args.js';
14
14
  import { detectProjectMode } from '../../util/config.js';
15
15
  import { rootRelative } from '../../util/files.js';
16
16
  import { fail, recordFailure } from '../../util/output.js';
17
- import { getOwnVersion } from '../../util/package.js';
17
+ import { cliCommand, getOwnVersion } from '../../util/package.js';
18
18
  import { MANAGED_APP_DIR, PROJECT_FILE_NAME, RC_FILE_NAME } from '../../../models/config/static-publish-project.js';
19
19
  // An environment variable for the tests of this package only. The tests run a
20
20
  // version that is not on npm, so they give here the spec of this package for
21
- // the ejected app.
22
- const PACKAGE_SPEC_ENV = 'CJSP_TEST_EJECT_PACKAGE_SPEC';
21
+ // the ejected app. eject shows a warning when it is set.
22
+ const PACKAGE_SPEC_ENV = 'CJSP_TEST_ONLY_EJECT_PACKAGE_SPEC';
23
23
  function help() {
24
24
  console.log(`\
25
25
 
26
26
  Usage:
27
- npx @fastly/compute-js-static-publish eject [options]
27
+ ${cliCommand()} eject [options]
28
28
 
29
29
  Description:
30
30
  Converts a managed project into an ejected app, which you own and change:
@@ -49,6 +49,14 @@ Global Options:
49
49
  -h, --help Show this help message and exit.
50
50
  `);
51
51
  }
52
+ // True if dir is a directory in parent (not parent itself).
53
+ function isInside(dir, parent) {
54
+ const relative = path.relative(parent, dir);
55
+ return relative !== '' && !relative.startsWith('..') && !path.isAbsolute(relative);
56
+ }
57
+ function isSameOrInside(dir, parent) {
58
+ return dir === parent || isInside(dir, parent);
59
+ }
52
60
  function isPublished(version) {
53
61
  const result = child_process.spawnSync('npm', ['view', `${THIS_PACKAGE}@${version}`, 'version'], { encoding: 'utf-8' });
54
62
  return result.status === 0 && result.stdout.trim() === version;
@@ -80,10 +88,15 @@ export async function action(actionArgs) {
80
88
  }
81
89
  const projectDir = path.resolve();
82
90
  const appDir = path.resolve(dirValue ?? './compute-js');
83
- if (appDir === projectDir || !appDir.startsWith(projectDir + path.sep) || appDir.startsWith(path.resolve(MANAGED_APP_DIR))) {
91
+ const workingDir = path.resolve(project.rc.staticPublisherWorkingDir);
92
+ if (!isInside(appDir, projectDir) || isSameOrInside(appDir, path.resolve(MANAGED_APP_DIR))) {
84
93
  fail('usage', `--dir must be a directory in the project dir, and not in ${MANAGED_APP_DIR}.`);
85
94
  return;
86
95
  }
96
+ if (isSameOrInside(appDir, workingDir)) {
97
+ fail('usage', `--dir must not be the working directory (${rootRelative(workingDir)}) or a directory in it. Use another --dir, or change staticPublisherWorkingDir.`);
98
+ return;
99
+ }
87
100
  if (fs.existsSync(appDir) && !force) {
88
101
  fail('usage', `${rootRelative(appDir)} exists. Use --force to write into it.`);
89
102
  return;
@@ -100,6 +113,9 @@ export async function action(actionArgs) {
100
113
  fail('version-not-published', `Eject needs a version of ${THIS_PACKAGE} that is published on npm. ${version} is not.`);
101
114
  return;
102
115
  }
116
+ if (testSpec != null) {
117
+ console.warn(`⚠️ ${PACKAGE_SPEC_ENV} is set (for the tests of this package only): the ejected app gets ${THIS_PACKAGE} ${testSpec}, and the check that ${version} is on npm is skipped.`);
118
+ }
103
119
  const packageSpec = testSpec ?? `^${version}`;
104
120
  const serviceId = (typeof fastlyServiceId === 'string' && fastlyServiceId !== '' ? fastlyServiceId : undefined) ??
105
121
  (process.env.FASTLY_SERVICE_ID || undefined) ??
@@ -131,10 +147,11 @@ export async function action(actionArgs) {
131
147
  files['package-lock.json'] = JSON.stringify(lock, undefined, 2) + '\n';
132
148
  console.log(`📦 Writing the app into ${rootRelative(appDir)}...`);
133
149
  writeManagedAppFiles(appDir, files);
134
- // Pin this package: "^<version>" stays in package.json, and the lockfile gets exactly <version>.
150
+ // Pin this package: "^<version>" stays in the dependencies of package.json,
151
+ // and the lockfile gets exactly <version>.
135
152
  const installArgs = testSpec != null ?
136
153
  ['install', '--no-audit', '--no-fund'] :
137
- ['install', '--save-dev', `${THIS_PACKAGE}@${version}`, '--no-audit', '--no-fund'];
154
+ ['install', '--save-prod', `${THIS_PACKAGE}@${version}`, '--no-audit', '--no-fund'];
138
155
  console.log(`npm ${installArgs.join(' ')}`);
139
156
  const install = child_process.spawnSync('npm', installArgs, { cwd: appDir, stdio: ['ignore', process.stderr, 'inherit'] });
140
157
  if (install.error != null || install.status !== 0) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/manage/index.ts"],"names":[],"mappings":"AAqFA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAmChD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/manage/index.ts"],"names":[],"mappings":"AAsFA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAmChD"}
@@ -13,11 +13,12 @@ import * as templateCommands from './template/index.js';
13
13
  import * as upgradeCommand from './upgrade.js';
14
14
  import * as publishContentCommand from './publish-content.js';
15
15
  import * as collectionsCommands from './collections/index.js';
16
+ import { cliCommand } from '../../util/package.js';
16
17
  function help() {
17
18
  console.log(`\
18
19
 
19
20
  Usage:
20
- npx @fastly/compute-js-static-publish <command> [options]
21
+ ${cliCommand()} <command> [options]
21
22
 
22
23
  Description:
23
24
  Manage and publish static content to Fastly Compute using KV Store-backed collections.
@@ -74,10 +75,10 @@ Automatic Project Initialization:
74
75
  Compute application for you, including Fastly configuration, default routes, and publishing setup.
75
76
 
76
77
  Examples:
77
- npx @fastly/compute-js-static-publish publish-content --collection-name=live
78
- npx @fastly/compute-js-static-publish collections list
79
- npx @fastly/compute-js-static-publish clean --dry-run
80
- npx @fastly/compute-js-static-publish publish-content --project-dir=./compute-js
78
+ ${cliCommand()} publish-content --collection-name=live
79
+ ${cliCommand()} collections list
80
+ ${cliCommand()} clean --dry-run
81
+ ${cliCommand()} publish-content --project-dir=./compute-js
81
82
  `);
82
83
  }
83
84
  export async function action(actionArgs) {
@@ -1 +1 @@
1
- {"version":3,"file":"publish-content.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/manage/publish-content.ts"],"names":[],"mappings":"AAgJA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAqmBhD"}
1
+ {"version":3,"file":"publish-content.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/manage/publish-content.ts"],"names":[],"mappings":"AAiJA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAwmBhD"}
@@ -21,6 +21,7 @@ import { concurrentMap } from '../../util/retryable.js';
21
21
  import { ProgressLog } from '../../util/progress.js';
22
22
  import { loadPurgeTarget, purgeCollection } from '../../util/purge.js';
23
23
  import { getStorageKeysByHexPrefix, isVariantInStorage, loadStorageProviderFromStaticPublishRc, StorageProviderBatch, } from '../../storage/storage-provider.js';
24
+ import { cliCommand } from '../../util/package.js';
24
25
  // Storage key format:
25
26
  // <publishId>_index_<preview_id>.json
26
27
  // <publishId>_settings_<preview_id>.json
@@ -29,7 +30,7 @@ function help() {
29
30
  console.log(`\
30
31
 
31
32
  Usage:
32
- npx @fastly/compute-js-static-publish publish-content [--collection-name=<name>] [options]
33
+ ${cliCommand()} publish-content [--collection-name=<name>] [options]
33
34
 
34
35
  Description:
35
36
  Publishes static files from your local root directory into a named collection,
@@ -106,9 +107,9 @@ Global Options:
106
107
  -h, --help Show this help message and exit.
107
108
 
108
109
  Examples:
109
- npx @fastly/compute-js-static-publish publish-content --collection-name=preview-456
110
- npx @fastly/compute-js-static-publish publish-content --expires-in=7d --kv-overwrite
111
- npx @fastly/compute-js-static-publish publish-content --expires-never --local
110
+ ${cliCommand()} publish-content --collection-name=preview-456
111
+ ${cliCommand()} publish-content --expires-in=7d --kv-overwrite
112
+ ${cliCommand()} publish-content --expires-never --local
112
113
 
113
114
  `);
114
115
  }
@@ -289,7 +290,7 @@ export async function action(actionArgs) {
289
290
  console.warn(`⚠️ Cannot parse hiddenItems item index ${i}: '${x}', skipping...`);
290
291
  });
291
292
  if (hiddenItems.length > 0) {
292
- console.log(`✔️ Hidden items: ${publishContentConfig.hiddenItems.join(', ')}`);
293
+ console.log(`✔️ Hidden items: ${publishContentConfig.hiddenItemsAsWritten.join(', ')}`);
293
294
  }
294
295
  // ### Collection name that we're currently publishing
295
296
  // for example, live, staging
@@ -513,6 +514,9 @@ export async function action(actionArgs) {
513
514
  expirationTime: expirationTime ?? undefined,
514
515
  // A server that does not support hidden files must not serve this collection.
515
516
  requires: hiddenCount > 0 ? [HIDDEN_INDEX_FEATURE] : undefined,
517
+ // For collections list, which then reads only the metadata.
518
+ fileCount: Object.keys(assetsIndex).length,
519
+ hiddenFileCount: hiddenCount,
516
520
  };
517
521
  const indexFileName = `index_${collectionName}.json`;
518
522
  const indexFilePath = path.resolve(storageContentDir, indexFileName);
@@ -1 +1 @@
1
- {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/manage/status.ts"],"names":[],"mappings":"AAgDA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAiIhD"}
1
+ {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/manage/status.ts"],"names":[],"mappings":"AAgDA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAsIhD"}
@@ -12,7 +12,7 @@ import { loadApiToken } from '../../util/api-token.js';
12
12
  import { parseCommandLine } from '../../util/args.js';
13
13
  import { recordFailure, setJsonResult } from '../../util/output.js';
14
14
  import { detectProjectMode } from '../../util/config.js';
15
- import { getOwnVersion } from '../../util/package.js';
15
+ import { cliCommand, getOwnVersion } from '../../util/package.js';
16
16
  import { loadServiceId } from '../../util/service-id.js';
17
17
  import { previewUrlTemplates } from '../../../models/config/collection-selection.js';
18
18
  import { MANAGED_APP_DIR } from '../../../models/config/static-publish-project.js';
@@ -22,7 +22,7 @@ function help() {
22
22
  console.log(`\
23
23
 
24
24
  Usage:
25
- npx @fastly/compute-js-static-publish status [options]
25
+ ${cliCommand()} status [options]
26
26
 
27
27
  Description:
28
28
  Shows the state of the app. In a managed project: the fingerprint of the app
@@ -115,6 +115,12 @@ export async function action(actionArgs) {
115
115
  reasons.push(deployed.staticPublishVersion !== running ?
116
116
  `The version of this package changed: ${deployed.staticPublishVersion} → ${running}.` :
117
117
  'The generated app changed.');
118
+ if (versionCheck.result === 'newer-cli' || versionCheck.result === 'missing') {
119
+ reasons.push(`Run 'upgrade' first, or deploy with --auto-upgrade: managed.staticPublishVersion (${versionCheck.recorded ?? 'missing'}) is not the version that runs (${running}).`);
120
+ }
121
+ else if (versionCheck.result !== 'same') {
122
+ reasons.push(`deploy refuses: this project uses a newer version (${versionCheck.recorded}) than the version that runs (${running}).`);
123
+ }
118
124
  }
119
125
  }
120
126
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/commands/manage/template/index.ts"],"names":[],"mappings":"AA2BA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAuBhD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/commands/manage/template/index.ts"],"names":[],"mappings":"AA4BA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAuBhD"}
@@ -5,11 +5,12 @@
5
5
  import { getCommandAndArgs } from '../../../util/args.js';
6
6
  import { recordFailure } from '../../../util/output.js';
7
7
  import * as initCommand from './init.js';
8
+ import { cliCommand } from '../../../util/package.js';
8
9
  function help() {
9
10
  console.log(`\
10
11
 
11
12
  Usage:
12
- npx @fastly/compute-js-static-publish template <sub-command> [options]
13
+ ${cliCommand()} template <sub-command> [options]
13
14
 
14
15
  Description:
15
16
  Commands for the template of the app.
@@ -14,12 +14,12 @@ import { parseCommandLine } from '../../../util/args.js';
14
14
  import { LoadConfigError, detectProjectMode, loadStaticPublisherRcFile } from '../../../util/config.js';
15
15
  import { rootRelative } from '../../../util/files.js';
16
16
  import { fail, isNonInteractive, recordFailure } from '../../../util/output.js';
17
- import { getOwnVersion } from '../../../util/package.js';
17
+ import { cliCommand, getOwnVersion } from '../../../util/package.js';
18
18
  function help() {
19
19
  console.log(`\
20
20
 
21
21
  Usage:
22
- npx @fastly/compute-js-static-publish template init [options]
22
+ ${cliCommand()} template init [options]
23
23
 
24
24
  Description:
25
25
  Makes or updates the folder of the app's template: for the hono template,
@@ -62,7 +62,7 @@ export async function runTemplateInit(params) {
62
62
  const plan = planTemplateInit(templateName, folderDir, provided, { reset });
63
63
  if (check) {
64
64
  if (plan.outOfDate.length > 0) {
65
- fail('template-init-needed', `${folderName} is out of date. Run: npx @fastly/compute-js-static-publish template init`);
65
+ fail('template-init-needed', `${folderName} is out of date. Run: ${cliCommand()} template init`);
66
66
  for (const reason of plan.outOfDate) {
67
67
  console.error(` * ${reason}`);
68
68
  }
@@ -5,14 +5,14 @@
5
5
  import { loadManagedProject, writeProjectVersion } from '../../managed/command-helpers.js';
6
6
  import { checkProjectVersion } from '../../managed/version-check.js';
7
7
  import { parseCommandLine } from '../../util/args.js';
8
- import { getOwnVersion } from '../../util/package.js';
8
+ import { cliCommand, getOwnVersion } from '../../util/package.js';
9
9
  import { PROJECT_FILE_NAME } from '../../../models/config/static-publish-project.js';
10
10
  import { fail, recordFailure } from '../../util/output.js';
11
11
  function help() {
12
12
  console.log(`\
13
13
 
14
14
  Usage:
15
- npx @fastly/compute-js-static-publish upgrade
15
+ ${cliCommand()} upgrade
16
16
 
17
17
  Description:
18
18
  Moves a managed project to the version of @fastly/compute-js-static-publish
@@ -1,3 +1,4 @@
1
+ export declare function appFastlyCommand(appDir: string): string;
1
2
  export type ServeResult = {
2
3
  status: number | null;
3
4
  signal: NodeJS.Signals | null;
@@ -1 +1 @@
1
- {"version":3,"file":"run-dev-watch.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/run-dev-watch.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;IAC9B,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAOF,wBAAsB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CAiBxF;AAKD,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAQjE"}
1
+ {"version":3,"file":"run-dev-watch.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/run-dev-watch.ts"],"names":[],"mappings":"AAaA,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAGvD;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;IAC9B,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAOF,wBAAsB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CA8CxF;AAKD,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAQjE"}
@@ -6,26 +6,62 @@ import * as child_process from 'node:child_process';
6
6
  import * as fs from 'node:fs';
7
7
  import * as path from 'node:path';
8
8
  import { TEMPLATE_WATCH_SCRIPT } from './scaffold/generate-app.js';
9
+ // The Fastly CLI of the app (its node_modules/.bin/fastly) if it has one, or
10
+ // else fastly from the PATH.
11
+ export function appFastlyCommand(appDir) {
12
+ const appFastly = path.resolve(appDir, 'node_modules/.bin/fastly');
13
+ return fs.existsSync(appFastly) ? appFastly : 'fastly';
14
+ }
9
15
  // Runs `fastly compute serve` in the app dir. With --watch, the watch script
10
16
  // (if the app has one) runs next to it, until the Fastly CLI stops. The script
11
17
  // can watch files outside the app dir: when they change, it writes a file in
12
18
  // the app dir, and then the Fastly CLI builds the app again. The Fastly CLI of
13
19
  // the app is used, if it has one.
14
20
  export async function serveApp(appDir, serveArgs) {
15
- const appFastly = path.resolve(appDir, 'node_modules/.bin/fastly');
16
- const fastly = fs.existsSync(appFastly) ? appFastly : 'fastly';
21
+ const fastly = appFastlyCommand(appDir);
17
22
  const watchScript = path.resolve(appDir, TEMPLATE_WATCH_SCRIPT);
18
23
  const watcher = serveArgs.includes('--watch') && fs.existsSync(watchScript) ?
19
24
  child_process.spawn(process.execPath, [watchScript], { cwd: appDir, stdio: 'inherit' }) :
20
25
  undefined;
21
- console.log(`▶️ fastly compute serve ${serveArgs.join(' ')}`);
22
- const result = await new Promise(resolve => {
23
- const child = child_process.spawn(fastly, ['compute', 'serve', ...serveArgs], { cwd: appDir, stdio: 'inherit' });
24
- child.on('error', error => resolve({ status: null, signal: null, error }));
25
- child.on('exit', (status, signal) => resolve({ status, signal }));
26
+ watcher?.on('error', error => {
27
+ console.error(`❌ Could not run ${TEMPLATE_WATCH_SCRIPT}: ${String(error)}`);
26
28
  });
27
- watcher?.kill();
28
- return result;
29
+ console.log(`▶️ fastly compute serve ${serveArgs.join(' ')}`);
30
+ // The Fastly CLI of the app is a Node.js wrapper that starts the fastly
31
+ // binary, which starts Viceroy. The wrapper does not forward signals. Thus
32
+ // the Fastly CLI runs in its own process group, and a signal goes to the
33
+ // whole group.
34
+ const child = child_process.spawn(fastly, ['compute', 'serve', ...serveArgs], { cwd: appDir, stdio: 'inherit', detached: true });
35
+ // A signal to this process (for example SIGTERM from a process manager, or
36
+ // SIGINT from Ctrl+C) goes to the Fastly CLI and to the watch script, so that
37
+ // nothing stays running. This process waits until the Fastly CLI stops.
38
+ const forward = (signal) => {
39
+ if (child.pid != null) {
40
+ try {
41
+ process.kill(-child.pid, signal);
42
+ }
43
+ catch {
44
+ // The process group has already stopped.
45
+ }
46
+ }
47
+ watcher?.kill(signal);
48
+ };
49
+ const signals = ['SIGINT', 'SIGTERM', 'SIGHUP'];
50
+ for (const signal of signals) {
51
+ process.on(signal, forward);
52
+ }
53
+ try {
54
+ return await new Promise(resolve => {
55
+ child.on('error', error => resolve({ status: null, signal: null, error }));
56
+ child.on('exit', (status, signal) => resolve({ status, signal }));
57
+ });
58
+ }
59
+ finally {
60
+ for (const signal of signals) {
61
+ process.off(signal, forward);
62
+ }
63
+ watcher?.kill();
64
+ }
29
65
  }
30
66
  // The dev:watch script of every app calls this: `fastly compute serve --watch`
31
67
  // in the current directory, with the watch script of the app. The arguments
@@ -4,9 +4,9 @@ import { type GeneratedFrom, type StaticPublishTemplateOptions } from '../../../
4
4
  import { type AppTemplate } from './app-template.js';
5
5
  export type AppConfig = {
6
6
  appDir: string;
7
- name: string | undefined;
8
- author: string | undefined;
9
- description: string | undefined;
7
+ name: string;
8
+ author: string;
9
+ description: string;
10
10
  serviceId: string | undefined;
11
11
  storage: {
12
12
  mode: 'kv-store';
@@ -43,5 +43,10 @@ export type AppConfig = {
43
43
  };
44
44
  export declare const TEMPLATE_HOOKS: readonly ['prebuild', 'postbuild', 'postinstall'];
45
45
  export declare const TEMPLATE_WATCH_SCRIPT = "scripts/template_watch.js";
46
+ export declare const DEFAULT_APP_INFO: {
47
+ name: string;
48
+ author: string;
49
+ description: string;
50
+ };
46
51
  export declare function generateApp(config: AppConfig): Record<string, string>;
47
52
  //# sourceMappingURL=generate-app.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate-app.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/scaffold/generate-app.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AAC1F,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AAC3F,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAGpH,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAMrD,MAAM,MAAM,SAAS,GAAG;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,OAAO,EACH;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,GACzC;QAAE,IAAI,EAAE,IAAI,CAA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;YAAE,aAAa,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC;IAG7C,eAAe,CAAC,EAAE,4BAA4B,CAAC;IAE/C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAIF,eAAO,MAAM,cAAc,YAAK,UAAU,EAAE,WAAW,EAAE,aAAa,CAAW,CAAC;AAKlF,eAAO,MAAM,qBAAqB,8BAA8B,CAAC;AAIjE,eAAO,MAAM,gBAAgB;IAC3B,IAAI;IACJ,MAAM;IACN,WAAW;CACZ,CAAC;AAKF,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAyLrE"}
@@ -14,6 +14,13 @@ export const TEMPLATE_HOOKS = ['prebuild', 'postbuild', 'postinstall'];
14
14
  // `fastly compute serve --watch` (npm run dev:watch, or dev -- --watch), until
15
15
  // it is stopped.
16
16
  export const TEMPLATE_WATCH_SCRIPT = 'scripts/template_watch.js';
17
+ // The name, author, and description of an app when the flags or the project
18
+ // file do not give them.
19
+ export const DEFAULT_APP_INFO = {
20
+ name: 'compute-js-static-site',
21
+ author: 'you@example.com',
22
+ description: 'Fastly Compute static site',
23
+ };
17
24
  // Makes the files of the app, keyed by the path relative to the app dir.
18
25
  // It does not write files or use the network, so that tests can compare its
19
26
  // output. It reads only the resources/ directory of this package.
@@ -54,10 +61,13 @@ export function generateApp(config) {
54
61
  type: 'module',
55
62
  devDependencies: {
56
63
  ...template.devDependencies,
57
- '@fastly/compute-js-static-publish': staticPublishVersionSpec,
58
64
  },
65
+ // This package is a dependency, not a dev dependency: the code of the app
66
+ // imports it, and the postinstall script runs it, also with
67
+ // npm ci --omit=dev.
59
68
  dependencies: {
60
69
  ...template.dependencies,
70
+ '@fastly/compute-js-static-publish': staticPublishVersionSpec,
61
71
  },
62
72
  engines: {
63
73
  node: '>=20.11.0',
@@ -8,9 +8,9 @@ export type InitAppOptions = {
8
8
  notFoundPage: string | undefined;
9
9
  autoIndex: string[];
10
10
  autoExt: string[];
11
- name: string | undefined;
12
- author: string | undefined;
13
- description: string | undefined;
11
+ name: string;
12
+ author: string;
13
+ description: string;
14
14
  serviceId: string | undefined;
15
15
  publishId: string | undefined;
16
16
  defaultCollectionName: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/scaffold/index.ts"],"names":[],"mappings":"AAoGA,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,yBAAyB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9C,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,qBAAqB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AA0UF,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAA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