@ms-cloudpack/cli 0.54.20 → 0.54.21

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":"execute.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/execute.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAIlE,eAAO,MAAM,OAAO,EAAE,aAAa,CAAC,WAAW,CA6C9C,CAAC"}
1
+ {"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/execute.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAIlE,eAAO,MAAM,OAAO,EAAE,aAAa,CAAC,WAAW,CAmD9C,CAAC"}
@@ -3,6 +3,11 @@ import { runPrerequisites } from '../../common/runPrerequisites.js';
3
3
  export const execute = async ({ options, reporter, initialize, exit, autoDispose }) => {
4
4
  const { cwd, login, upload } = options;
5
5
  const { config, telemetryClient } = await initialize({ appPath: cwd });
6
+ if (!config.features?.syncBundles) {
7
+ console.warn('Sync is disabled.');
8
+ await exit({ exitCode: 0 });
9
+ return;
10
+ }
6
11
  try {
7
12
  const remoteCacheConfig = config.remoteCache;
8
13
  if (!remoteCacheConfig) {
@@ -1 +1 @@
1
- {"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../src/commands/sync/execute.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAClG,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,MAAM,CAAC,MAAM,OAAO,GAA+B,KAAK,EAAE,EAAE,OAAO,E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;QAED,MAAM,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC;IAC9B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,eAAe,CAAC,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QAClD,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAC","sourcesContent":["import type { SyncOptions } from './types/SyncOptions.js';\nimport type { CommandAction } from '../../types/CommandAction.js';\nimport { createPartialApiContext, syncDownload, syncUpload } from '@ms-cloudpack/api-server/apis';\nimport { runPrerequisites } from '../../common/runPrerequisites.js';\n\nexport const execute: CommandAction<SyncOptions> = async ({ options, reporter, initialize, exit, autoDispose }) => {\n const { cwd, login, upload } = options;\n const { config, telemetryClient } = await initialize({ appPath: cwd });\n\n try {\n const remoteCacheConfig = config.remoteCache;\n if (!remoteCacheConfig) {\n console.warn(\n 'Remote cache is not configured. Please add remoteCache to your cloudpack.config.json file to use this feature.',\n );\n return;\n }\n\n const input = {\n loginMethod: login,\n };\n\n const apiContextOptions = { appPath: cwd, config, reporter, telemetryClient };\n if (upload) {\n runPrerequisites(config, cwd);\n\n const [ctx] = autoDispose(\n await createPartialApiContext({\n ...apiContextOptions,\n items: ['bus', 'taskRunner', 'watcher', 'packages', 'session', 'packageImportPaths', 'packageHashes'],\n }),\n );\n await syncUpload({ input, ctx });\n } else {\n const [ctx] = autoDispose(\n await createPartialApiContext({\n ...apiContextOptions,\n items: ['packages', 'session', 'packageHashes'],\n }),\n );\n await syncDownload({ input, ctx });\n }\n\n await exit({ exitCode: 0 });\n } catch (error) {\n if (error instanceof Error) {\n telemetryClient.rootSpan.recordException(error);\n }\n throw error;\n }\n};\n"]}
1
+ {"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../src/commands/sync/execute.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,YAAY,EAAE,U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CACH,CAAC;YACF,MAAM,UAAU,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;QACnC,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,GAAG,CAAC,GAAG,WAAW,CACvB,MAAM,uBAAuB,CAAC;gBAC5B,GAAG,iBAAiB;gBACpB,KAAK,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,eAAe,CAAC;aAChD,CAAC,CACH,CAAC;YACF,MAAM,YAAY,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;QACrC,CAAC;QAED,MAAM,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC;IAC9B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,eAAe,CAAC,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QAClD,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAC","sourcesContent":["import type { SyncOptions } from './types/SyncOptions.js';\nimport type { CommandAction } from '../../types/CommandAction.js';\nimport { createPartialApiContext, syncDownload, syncUpload } from '@ms-cloudpack/api-server/apis';\nimport { runPrerequisites } from '../../common/runPrerequisites.js';\n\nexport const execute: CommandAction<SyncOptions> = async ({ options, reporter, initialize, exit, autoDispose }) => {\n const { cwd, login, upload } = options;\n const { config, telemetryClient } = await initialize({ appPath: cwd });\n\n if (!config.features?.syncBundles) {\n console.warn('Sync is disabled.');\n await exit({ exitCode: 0 });\n return;\n }\n\n try {\n const remoteCacheConfig = config.remoteCache;\n if (!remoteCacheConfig) {\n console.warn(\n 'Remote cache is not configured. Please add remoteCache to your cloudpack.config.json file to use this feature.',\n );\n return;\n }\n\n const input = {\n loginMethod: login,\n };\n\n const apiContextOptions = { appPath: cwd, config, reporter, telemetryClient };\n if (upload) {\n runPrerequisites(config, cwd);\n\n const [ctx] = autoDispose(\n await createPartialApiContext({\n ...apiContextOptions,\n items: ['bus', 'taskRunner', 'watcher', 'packages', 'session', 'packageImportPaths', 'packageHashes'],\n }),\n );\n await syncUpload({ input, ctx });\n } else {\n const [ctx] = autoDispose(\n await createPartialApiContext({\n ...apiContextOptions,\n items: ['packages', 'session', 'packageHashes'],\n }),\n );\n await syncDownload({ input, ctx });\n }\n\n await exit({ exitCode: 0 });\n } catch (error) {\n if (error instanceof Error) {\n telemetryClient.rootSpan.recordException(error);\n }\n throw error;\n }\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ms-cloudpack/cli",
3
- "version": "0.54.20",
3
+ "version": "0.54.21",
4
4
  "description": "The Cloudpack command line interface - a tool for managing fast inner and outer looping in web apps.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -10,16 +10,16 @@
10
10
  "cloudpack": "./bin/cloudpack.js"
11
11
  },
12
12
  "dependencies": {
13
- "@ms-cloudpack/api-server": "^0.29.13",
14
- "@ms-cloudpack/bundle-server": "^0.2.6",
15
- "@ms-cloudpack/config": "^0.17.14",
16
- "@ms-cloudpack/config-types": "^0.4.0",
13
+ "@ms-cloudpack/api-server": "^0.29.14",
14
+ "@ms-cloudpack/bundle-server": "^0.2.7",
15
+ "@ms-cloudpack/config": "^0.17.15",
16
+ "@ms-cloudpack/config-types": "^0.4.1",
17
17
  "@ms-cloudpack/json-utilities": "^0.1.3",
18
- "@ms-cloudpack/package-utilities": "^5.7.8",
18
+ "@ms-cloudpack/package-utilities": "^5.7.9",
19
19
  "@ms-cloudpack/path-string-parsing": "^1.1.3",
20
- "@ms-cloudpack/remote-cache": "^0.4.5",
21
- "@ms-cloudpack/app-server": "^0.1.7",
22
- "@ms-cloudpack/task-reporter": "^0.11.0",
20
+ "@ms-cloudpack/remote-cache": "^0.4.6",
21
+ "@ms-cloudpack/app-server": "^0.1.8",
22
+ "@ms-cloudpack/task-reporter": "^0.11.1",
23
23
  "@ms-cloudpack/telemetry": "^0.4.5",
24
24
  "@yarnpkg/lockfile": "^1.1.0",
25
25
  "commander": "^11.1.0",