@uniformdev/cli 20.26.1-alpha.0 → 20.26.2

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 (2) hide show
  1. package/dist/index.mjs +73 -12
  2. package/package.json +9 -9
package/dist/index.mjs CHANGED
@@ -857,7 +857,7 @@ import {
857
857
  walkNodeTree,
858
858
  walkPropertyValues
859
859
  } from "@uniformdev/canvas";
860
- var UNIFORM_FILE_MATCH = /"(https:\/\/([^"]*?)?(img|files)\.uniform\.(rocks|global)\/([^"]*?))"/g;
860
+ var UNIFORM_FILE_MATCH = /"(https:\/\/([^"]*?)?(img|files)\.(eu\.)?uniform\.(rocks|global)\/([^"]*?))"/g;
861
861
  var walkFileUrlsForCompositionOrEntry = ({
862
862
  entity,
863
863
  callback
@@ -4196,6 +4196,11 @@ var EntryGetModule = {
4196
4196
  type: "number",
4197
4197
  default: 1,
4198
4198
  describe: "Controls how many levels deep content references should be resolved"
4199
+ },
4200
+ withComponentIDs: {
4201
+ type: "boolean",
4202
+ default: false,
4203
+ describe: "Include IDs of blocks in block fields"
4199
4204
  }
4200
4205
  }),
4201
4206
  // for backwards compatibility, we default to the "published" state, unlike compositions
@@ -4219,6 +4224,7 @@ var EntryGetModule = {
4219
4224
  resolveData,
4220
4225
  diagnostics,
4221
4226
  resolutionDepth,
4227
+ withComponentIDs,
4222
4228
  verbose
4223
4229
  }) => {
4224
4230
  const fetch2 = nodeFetchProxy(proxy, verbose);
@@ -4232,7 +4238,8 @@ var EntryGetModule = {
4232
4238
  skipPatternResolution: true,
4233
4239
  skipDataResolution: !resolveData,
4234
4240
  diagnostics: resolveData ? diagnostics : void 0,
4235
- resolutionDepth: resolveData ? resolutionDepth : void 0
4241
+ resolutionDepth: resolveData ? resolutionDepth : void 0,
4242
+ withComponentIDs
4236
4243
  });
4237
4244
  if (res.entries.length !== 1) {
4238
4245
  throw new Error(`Entry with ID ${id} not found`);
@@ -4259,7 +4266,12 @@ var EntryListModule = {
4259
4266
  type: "number",
4260
4267
  default: LEGACY_DEFAULT_LIMIT
4261
4268
  },
4262
- search: { describe: "Search query", type: "string", default: "" }
4269
+ search: { describe: "Search query", type: "string", default: "" },
4270
+ withComponentIDs: {
4271
+ type: "boolean",
4272
+ default: false,
4273
+ describe: "Include IDs of blocks in block fields"
4274
+ }
4263
4275
  }),
4264
4276
  // for backwards compatibility, we default to the "published" state, unlike compositions
4265
4277
  "published"
@@ -4281,6 +4293,7 @@ var EntryListModule = {
4281
4293
  limit: limit2,
4282
4294
  offset,
4283
4295
  search,
4296
+ withComponentIDs,
4284
4297
  verbose
4285
4298
  }) => {
4286
4299
  const fetch2 = nodeFetchProxy(proxy, verbose);
@@ -4293,7 +4306,8 @@ var EntryListModule = {
4293
4306
  state: convertStateOption(state),
4294
4307
  skipOverridesResolution: true,
4295
4308
  skipPatternResolution: true,
4296
- skipDataResolution: true
4309
+ skipDataResolution: true,
4310
+ withComponentIDs
4297
4311
  });
4298
4312
  emitWithFormat(res.entries, format, filename);
4299
4313
  }
@@ -4830,6 +4844,12 @@ var EntryPatternGetModule = {
4830
4844
  yargs35.positional("id", {
4831
4845
  demandOption: true,
4832
4846
  describe: "Entry pattern public ID to fetch"
4847
+ }).option({
4848
+ withComponentIDs: {
4849
+ type: "boolean",
4850
+ default: false,
4851
+ describe: "Include IDs of blocks in block fields"
4852
+ }
4833
4853
  }),
4834
4854
  "published"
4835
4855
  )
@@ -4838,7 +4858,18 @@ var EntryPatternGetModule = {
4838
4858
  )
4839
4859
  )
4840
4860
  ),
4841
- handler: async ({ apiHost, apiKey, proxy, id, format, filename, project: projectId, state, verbose }) => {
4861
+ handler: async ({
4862
+ apiHost,
4863
+ apiKey,
4864
+ proxy,
4865
+ id,
4866
+ format,
4867
+ filename,
4868
+ project: projectId,
4869
+ state,
4870
+ withComponentIDs,
4871
+ verbose
4872
+ }) => {
4842
4873
  const fetch2 = nodeFetchProxy(proxy, verbose);
4843
4874
  const client = getContentClient({ apiKey, apiHost, fetch: fetch2, projectId });
4844
4875
  const res = await client.getEntries({
@@ -4849,7 +4880,8 @@ var EntryPatternGetModule = {
4849
4880
  skipOverridesResolution: true,
4850
4881
  skipPatternResolution: true,
4851
4882
  skipDataResolution: true,
4852
- pattern: true
4883
+ pattern: true,
4884
+ withComponentIDs
4853
4885
  });
4854
4886
  if (res.entries.length !== 1) {
4855
4887
  throw new Error(`Entry pattern with ID ${id} not found`);
@@ -4864,7 +4896,22 @@ var EntryPatternListModule = {
4864
4896
  describe: "List entry patterns",
4865
4897
  builder: (yargs35) => withConfiguration(
4866
4898
  withDebugOptions(
4867
- withFormatOptions(withApiOptions(withProjectOptions(withStateOptions(yargs35, "published"))))
4899
+ withFormatOptions(
4900
+ withApiOptions(
4901
+ withProjectOptions(
4902
+ withStateOptions(
4903
+ yargs35.option({
4904
+ withComponentIDs: {
4905
+ type: "boolean",
4906
+ default: false,
4907
+ describe: "Include IDs of blocks in block fields"
4908
+ }
4909
+ }),
4910
+ "published"
4911
+ )
4912
+ )
4913
+ )
4914
+ )
4868
4915
  )
4869
4916
  ),
4870
4917
  handler: async ({
@@ -4876,6 +4923,7 @@ var EntryPatternListModule = {
4876
4923
  filename,
4877
4924
  project: projectId,
4878
4925
  state,
4926
+ withComponentIDs,
4879
4927
  verbose
4880
4928
  }) => {
4881
4929
  const fetch2 = nodeFetchProxy(proxy, verbose);
@@ -4887,7 +4935,8 @@ var EntryPatternListModule = {
4887
4935
  skipOverridesResolution: true,
4888
4936
  skipPatternResolution: true,
4889
4937
  skipDataResolution: true,
4890
- pattern: true
4938
+ pattern: true,
4939
+ withComponentIDs
4891
4940
  });
4892
4941
  emitWithFormat(res.entries, format, filename);
4893
4942
  }
@@ -8548,7 +8597,7 @@ import { PostHog } from "posthog-node";
8548
8597
  // package.json
8549
8598
  var package_default = {
8550
8599
  name: "@uniformdev/cli",
8551
- version: "20.26.0",
8600
+ version: "20.26.2",
8552
8601
  description: "Uniform command line interface tool",
8553
8602
  license: "SEE LICENSE IN LICENSE.txt",
8554
8603
  main: "./cli.js",
@@ -9291,8 +9340,9 @@ async function newHandler({
9291
9340
  }
9292
9341
  }
9293
9342
  };
9343
+ let githubBranch = void 0;
9294
9344
  const {
9295
- starter: { githubUri, serverUrl, previewPath, installEnv, githubBranch }
9345
+ starter: { githubUri, serverUrl, previewPath, installEnv }
9296
9346
  } = await inquirer4.prompt([
9297
9347
  {
9298
9348
  type: "list",
@@ -9301,7 +9351,13 @@ async function newHandler({
9301
9351
  choices: Object.values(starters[frontendFramework])
9302
9352
  }
9303
9353
  ]);
9304
- telemetry.send("starter picked", { githubUri });
9354
+ if (process.env.UNIFORM_ALTERNATIVE_STARTER_BRANCH) {
9355
+ console.log(
9356
+ `Using alternative starter branch for repo ${githubUri}: "${process.env.UNIFORM_ALTERNATIVE_STARTER_BRANCH}"`
9357
+ );
9358
+ githubBranch = process.env.UNIFORM_ALTERNATIVE_STARTER_BRANCH;
9359
+ }
9360
+ telemetry.send("starter picked", { githubUri, githubBranch });
9305
9361
  const { projectId, targetDir } = await getOrCreateProject({
9306
9362
  client: uniformClient,
9307
9363
  createNew: true,
@@ -9409,10 +9465,15 @@ async function newMeshIntegrationHandler({
9409
9465
  ]);
9410
9466
  const name = answer.name;
9411
9467
  const { targetDir, typeSlug } = validateIntegrationName(answer.name, outputPath);
9468
+ const githubBranch = process.env.UNIFORM_ALTERNATIVE_MESH_INTEGRATION_BRANCH;
9469
+ if (githubBranch) {
9470
+ console.log(`Using alternative mesh integration branch: "${githubBranch}"`);
9471
+ }
9412
9472
  const { runNpmInstall } = await cloneStarter({
9413
9473
  githubPath: `uniformdev/examples/mesh/mesh-integration`,
9414
9474
  spin,
9415
- targetDir
9475
+ targetDir,
9476
+ githubBranch
9416
9477
  });
9417
9478
  let done = await spin("Registering integration to team...");
9418
9479
  const pathToManifest = path3.resolve(targetDir, "mesh-manifest.json");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/cli",
3
- "version": "20.26.1-alpha.0+ff834f63d0",
3
+ "version": "20.26.2",
4
4
  "description": "Uniform command line interface tool",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./cli.js",
@@ -27,13 +27,13 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@thi.ng/mime": "^2.2.23",
30
- "@uniformdev/assets": "20.26.1-alpha.0+ff834f63d0",
31
- "@uniformdev/canvas": "20.26.1-alpha.0+ff834f63d0",
32
- "@uniformdev/context": "20.26.1-alpha.0+ff834f63d0",
33
- "@uniformdev/files": "20.26.1-alpha.0+ff834f63d0",
34
- "@uniformdev/project-map": "20.26.1-alpha.0+ff834f63d0",
35
- "@uniformdev/redirect": "20.26.1-alpha.0+ff834f63d0",
36
- "@uniformdev/richtext": "20.26.1-alpha.0+ff834f63d0",
30
+ "@uniformdev/assets": "20.26.2",
31
+ "@uniformdev/canvas": "20.26.2",
32
+ "@uniformdev/context": "20.26.2",
33
+ "@uniformdev/files": "20.26.2",
34
+ "@uniformdev/project-map": "20.26.2",
35
+ "@uniformdev/redirect": "20.26.2",
36
+ "@uniformdev/richtext": "20.26.2",
37
37
  "call-bind": "^1.0.2",
38
38
  "colorette": "2.0.20",
39
39
  "cosmiconfig": "9.0.0",
@@ -79,5 +79,5 @@
79
79
  "publishConfig": {
80
80
  "access": "public"
81
81
  },
82
- "gitHead": "ff834f63d07f7f709e42f69705b93ae20f6b7ddf"
82
+ "gitHead": "e9f8f8081d816af23d625d40d1a0557979b85feb"
83
83
  }