@uniformdev/cli 19.5.1-alpha.22 → 19.6.0

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 +14 -9
  2. package/package.json +6 -6
package/dist/index.mjs CHANGED
@@ -245,7 +245,7 @@ async function createFileSyncEngineDataSource({
245
245
  format = "yaml",
246
246
  selectIdentifier: selectIdentifier12,
247
247
  selectDisplayName: selectDisplayName12 = selectIdentifier12,
248
- selectFilename: selectFilename2,
248
+ selectFilename: selectFilename3,
249
249
  selectSchemaUrl: selectSchemaUrl2
250
250
  }) {
251
251
  const dirExists = existsSync(directory);
@@ -285,7 +285,7 @@ ${e == null ? void 0 : e.message}`));
285
285
  await unlink(providerId);
286
286
  },
287
287
  writeObject: async (object) => {
288
- const filename = selectFilename2 ? join(directory, `${selectFilename2(object.object)}.${format}`) : getFullFilename(object.id);
288
+ const filename = selectFilename3 ? join(directory, `${selectFilename3(object.object)}.${format}`) : getFullFilename(object.id);
289
289
  let contents = object.object;
290
290
  if (selectSchemaUrl2) {
291
291
  contents = {
@@ -3233,7 +3233,7 @@ import { PostHog } from "posthog-node";
3233
3233
  // package.json
3234
3234
  var package_default = {
3235
3235
  name: "@uniformdev/cli",
3236
- version: "19.5.0",
3236
+ version: "19.6.0",
3237
3237
  description: "Uniform command line interface tool",
3238
3238
  license: "SEE LICENSE IN LICENSE.txt",
3239
3239
  main: "./cli.js",
@@ -5044,10 +5044,17 @@ function writeContextPackage3(filename, packageContents) {
5044
5044
 
5045
5045
  // src/commands/redirect/commands/RedirectDefinition/_util.ts
5046
5046
  var selectIdentifier11 = (source) => source.redirect.id;
5047
+ var selectFilename2 = (source) => {
5048
+ const index = source.redirect.sourceUrl.lastIndexOf("/");
5049
+ return source.redirect.sourceUrl.substring(index + 1).replace(/[/<>$+%>!`&*'|{}?"=:\\@]/g, "-") + `_${source.redirect.id}`;
5050
+ };
5047
5051
  var selectDisplayName11 = (source) => {
5048
- console.log(JSON.stringify(source, void 0, " "));
5049
- console.log(`${source.redirect.sourceUrl} (pid: ${source.redirect.id})`);
5050
- return `${source.redirect.sourceUrl} (pid: ${source.redirect.id})`;
5052
+ let pathName = source.redirect.sourceUrl;
5053
+ if (pathName.length > 30) {
5054
+ const slashIndex = source.redirect.sourceUrl.indexOf("/", source.redirect.sourceUrl.length - 30);
5055
+ pathName = "..." + pathName.substring(slashIndex);
5056
+ }
5057
+ return `${pathName} (id: ${source.redirect.id})`;
5051
5058
  };
5052
5059
 
5053
5060
  // src/commands/redirect/RedirectEngineDataSource.ts
@@ -5138,9 +5145,7 @@ var RedirectDefinitionPullModule = {
5138
5145
  } else {
5139
5146
  target = await createFileSyncEngineDataSource({
5140
5147
  directory,
5141
- selectFilename: (o) => {
5142
- return o.redirect.sourceUrl.replace(/[/<>$+%>!`&*'|{}?"=:\\@]/g, "-");
5143
- },
5148
+ selectFilename: selectFilename2,
5144
5149
  selectIdentifier: selectIdentifier11,
5145
5150
  selectDisplayName: selectDisplayName11,
5146
5151
  format
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/cli",
3
- "version": "19.5.1-alpha.22+5b4a94102",
3
+ "version": "19.6.0",
4
4
  "description": "Uniform command line interface tool",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./cli.js",
@@ -16,10 +16,10 @@
16
16
  "format": "prettier --write \"src/**/*.{js,ts,tsx}\""
17
17
  },
18
18
  "dependencies": {
19
- "@uniformdev/canvas": "19.5.1-alpha.22+5b4a94102",
20
- "@uniformdev/context": "19.5.1-alpha.22+5b4a94102",
21
- "@uniformdev/project-map": "19.5.1-alpha.22+5b4a94102",
22
- "@uniformdev/redirect": "19.5.1-alpha.22+5b4a94102",
19
+ "@uniformdev/canvas": "19.6.0",
20
+ "@uniformdev/context": "19.6.0",
21
+ "@uniformdev/project-map": "19.6.0",
22
+ "@uniformdev/redirect": "19.6.0",
23
23
  "chalk": "^5.2.0",
24
24
  "diff": "^5.0.0",
25
25
  "dotenv": "^16.0.3",
@@ -60,5 +60,5 @@
60
60
  "publishConfig": {
61
61
  "access": "public"
62
62
  },
63
- "gitHead": "5b4a94102c83a88c9fbf888a24d633e8abf96b76"
63
+ "gitHead": "a14550dd1caa33fa1310ada642d06ce79bbe4eac"
64
64
  }