@dcloudio/uni-cli-shared 3.0.0-alpha-3030020211130002 → 3.0.0-alpha-3030020211206001

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.
@@ -5,6 +5,7 @@ export declare const EXTNAME_VUE: string[];
5
5
  export declare const EXTNAME_VUE_RE: RegExp;
6
6
  export declare const EXTNAME_JS_RE: RegExp;
7
7
  export declare const EXTNAME_TS_RE: RegExp;
8
+ export declare const extensions: string[];
8
9
  export declare const ASSETS_INLINE_LIMIT: number;
9
10
  export declare const APP_SERVICE_FILENAME = "app-service.js";
10
11
  export declare const BINDING_COMPONENTS = "__BINDING_COMPONENTS__";
package/dist/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.COMMON_EXCLUDE = exports.BASE_COMPONENTS_STYLE_PATH = exports.H5_COMPONENTS_STYLE_PATH = exports.H5_FRAMEWORK_STYLE_PATH = exports.H5_API_STYLE_PATH = exports.PAGE_EXTNAME = exports.PAGE_EXTNAME_APP = exports.BINDING_COMPONENTS = exports.APP_SERVICE_FILENAME = exports.ASSETS_INLINE_LIMIT = exports.EXTNAME_TS_RE = exports.EXTNAME_JS_RE = exports.EXTNAME_VUE_RE = exports.EXTNAME_VUE = exports.EXTNAME_TS = exports.EXTNAME_JS = exports.PUBLIC_DIR = void 0;
3
+ exports.COMMON_EXCLUDE = exports.BASE_COMPONENTS_STYLE_PATH = exports.H5_COMPONENTS_STYLE_PATH = exports.H5_FRAMEWORK_STYLE_PATH = exports.H5_API_STYLE_PATH = exports.PAGE_EXTNAME = exports.PAGE_EXTNAME_APP = exports.BINDING_COMPONENTS = exports.APP_SERVICE_FILENAME = exports.ASSETS_INLINE_LIMIT = exports.extensions = exports.EXTNAME_TS_RE = exports.EXTNAME_JS_RE = exports.EXTNAME_VUE_RE = exports.EXTNAME_VUE = exports.EXTNAME_TS = exports.EXTNAME_JS = exports.PUBLIC_DIR = void 0;
4
4
  exports.PUBLIC_DIR = 'static';
5
5
  exports.EXTNAME_JS = ['.js', '.ts', '.jsx', '.tsx'];
6
6
  exports.EXTNAME_TS = ['.ts', '.tsx'];
@@ -8,6 +8,14 @@ exports.EXTNAME_VUE = ['.vue', '.nvue'];
8
8
  exports.EXTNAME_VUE_RE = /\.(vue|nvue)$/;
9
9
  exports.EXTNAME_JS_RE = /\.[jt]sx?$/;
10
10
  exports.EXTNAME_TS_RE = /\.tsx?$/;
11
+ exports.extensions = [
12
+ '.mjs',
13
+ '.js',
14
+ '.ts',
15
+ '.jsx',
16
+ '.tsx',
17
+ '.json',
18
+ ].concat(exports.EXTNAME_VUE);
11
19
  exports.ASSETS_INLINE_LIMIT = 40 * 1024;
12
20
  exports.APP_SERVICE_FILENAME = 'app-service.js';
13
21
  exports.BINDING_COMPONENTS = '__BINDING_COMPONENTS__';
@@ -4,6 +4,7 @@ export declare function initDefine(stringifyBoolean?: boolean): {
4
4
  'process.env.UNI_APP_ID': string;
5
5
  'process.env.UNI_APP_NAME': string;
6
6
  'process.env.UNI_PLATFORM': string;
7
+ 'process.env.UNI_MP_PLUGIN': string;
7
8
  'process.env.UNI_SUBPACKAGE': string;
8
9
  'process.env.UNI_COMPILER_VERSION': string;
9
10
  'process.env.RUN_BY_HBUILDERX': string | boolean;
@@ -15,6 +15,7 @@ function initDefine(stringifyBoolean = false) {
15
15
  'process.env.UNI_APP_ID': JSON.stringify(manifestJson.appid || ''),
16
16
  'process.env.UNI_APP_NAME': JSON.stringify(manifestJson.name || ''),
17
17
  'process.env.UNI_PLATFORM': JSON.stringify(process.env.UNI_PLATFORM),
18
+ 'process.env.UNI_MP_PLUGIN': JSON.stringify(process.env.UNI_MP_PLUGIN),
18
19
  'process.env.UNI_SUBPACKAGE': JSON.stringify(process.env.UNI_SUBPACKAGE),
19
20
  'process.env.UNI_COMPILER_VERSION': JSON.stringify(process.env.UNI_COMPILER_VERSION),
20
21
  'process.env.RUN_BY_HBUILDERX': stringifyBoolean
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './fs';
2
2
  export * from './mp';
3
+ export * from './url';
3
4
  export * from './env';
4
5
  export * from './hbx';
5
6
  export * from './ssr';
package/dist/index.js CHANGED
@@ -13,6 +13,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.checkUpdate = exports.M = void 0;
14
14
  __exportStar(require("./fs"), exports);
15
15
  __exportStar(require("./mp"), exports);
16
+ __exportStar(require("./url"), exports);
16
17
  __exportStar(require("./env"), exports);
17
18
  __exportStar(require("./hbx"), exports);
18
19
  __exportStar(require("./ssr"), exports);
@@ -1,2 +1,3 @@
1
1
  export * from './pages';
2
2
  export * from './manifest';
3
+ export { polyfillCode } from './pages/code';
@@ -10,5 +10,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
10
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.polyfillCode = void 0;
13
14
  __exportStar(require("./pages"), exports);
14
15
  __exportStar(require("./manifest"), exports);
16
+ var code_1 = require("./pages/code");
17
+ Object.defineProperty(exports, "polyfillCode", { enumerable: true, get: function () { return code_1.polyfillCode; } });
@@ -1 +1,2 @@
1
1
  export declare function initArguments(manifestJson: Record<string, any>, pagesJson: UniApp.PagesJson): void;
2
+ export declare function parseArguments(pagesJson: UniApp.PagesJson): string | undefined;
@@ -1,18 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.initArguments = void 0;
3
+ exports.parseArguments = exports.initArguments = void 0;
4
4
  function initArguments(manifestJson, pagesJson) {
5
+ const args = parseArguments(pagesJson);
6
+ if (args) {
7
+ manifestJson.plus.arguments = args;
8
+ }
9
+ }
10
+ exports.initArguments = initArguments;
11
+ function parseArguments(pagesJson) {
5
12
  var _a;
6
13
  if (process.env.NODE_ENV !== 'development') {
7
14
  return;
8
15
  }
9
16
  // 指定了入口
10
17
  if (process.env.UNI_CLI_LAUNCH_PAGE_PATH) {
11
- manifestJson.plus.arguments = JSON.stringify({
18
+ return JSON.stringify({
12
19
  path: process.env.UNI_CLI_LAUNCH_PAGE_PATH,
13
20
  query: process.env.UNI_CLI_LAUNCH_PAGE_QUERY,
14
21
  });
15
- return;
16
22
  }
17
23
  const condition = pagesJson.condition;
18
24
  if (condition && ((_a = condition.list) === null || _a === void 0 ? void 0 : _a.length)) {
@@ -24,7 +30,7 @@ function initArguments(manifestJson, pagesJson) {
24
30
  if (current >= list.length) {
25
31
  current = 0;
26
32
  }
27
- manifestJson.plus.arguments = JSON.stringify(list[current]);
33
+ return JSON.stringify(list[current]);
28
34
  }
29
35
  }
30
- exports.initArguments = initArguments;
36
+ exports.parseArguments = parseArguments;
@@ -1,4 +1,4 @@
1
1
  export declare function initNVue(manifestJson: Record<string, any>, pagesJson: UniApp.PagesJson): void;
2
- export declare function getNVueCompiler(manifestJson: Record<string, any>): "uni-app" | "weex" | "vue";
2
+ export declare function getNVueCompiler(manifestJson: Record<string, any>): "uni-app" | "weex" | "vue" | "vite";
3
3
  export declare function getNVueStyleCompiler(manifestJson: Record<string, any>): "uni-app" | "weex";
4
4
  export declare function getNVueFlexDirection(manifestJson: Record<string, any>): "row" | "row-reverse" | "column" | "column-reverse";
@@ -13,6 +13,9 @@ function getNVueCompiler(manifestJson) {
13
13
  if (nvueCompiler === 'vue') {
14
14
  return 'vue';
15
15
  }
16
+ if (nvueCompiler === 'vite') {
17
+ return 'vite';
18
+ }
16
19
  }
17
20
  return 'uni-app';
18
21
  }
@@ -8,6 +8,7 @@ const path_1 = __importDefault(require("path"));
8
8
  const i18n_1 = require("../../../i18n");
9
9
  const manifest_1 = require("../../manifest");
10
10
  const manifest_2 = require("../manifest");
11
+ const arguments_1 = require("../manifest/arguments");
11
12
  const splashscreen_1 = require("../manifest/splashscreen");
12
13
  function normalizeAppUniConfig(pagesJson, manifestJson) {
13
14
  var _a;
@@ -27,7 +28,7 @@ function normalizeAppUniConfig(pagesJson, manifestJson) {
27
28
  autoclose,
28
29
  },
29
30
  compilerVersion: process.env.UNI_COMPILER_VERSION,
30
- entryPagePath: pagesJson.pages[0].path,
31
+ ...parseEntryPagePath(pagesJson),
31
32
  networkTimeout: (0, manifest_1.normalizeNetworkTimeout)(manifestJson.networkTimeout),
32
33
  tabBar: pagesJson.tabBar,
33
34
  locales: (0, i18n_1.initLocales)(path_1.default.join(process.env.UNI_INPUT_DIR, 'locale')),
@@ -36,3 +37,33 @@ function normalizeAppUniConfig(pagesJson, manifestJson) {
36
37
  return JSON.stringify(config);
37
38
  }
38
39
  exports.normalizeAppUniConfig = normalizeAppUniConfig;
40
+ function parseEntryPagePath(pagesJson) {
41
+ var _a;
42
+ const res = {
43
+ entryPagePath: '',
44
+ entryPageQuery: '',
45
+ realEntryPagePath: '',
46
+ };
47
+ if (!pagesJson.pages.length) {
48
+ return res;
49
+ }
50
+ res.entryPagePath = pagesJson.pages[0].path;
51
+ const argsJsonStr = (0, arguments_1.parseArguments)(pagesJson);
52
+ if (argsJsonStr) {
53
+ try {
54
+ const args = JSON.parse(argsJsonStr);
55
+ const entryPagePath = args.path || args.pathName;
56
+ const realEntryPagePath = res.entryPagePath;
57
+ if (entryPagePath && realEntryPagePath !== entryPagePath) {
58
+ res.entryPagePath = entryPagePath;
59
+ res.entryPageQuery = args.query ? '?' + args.query : '';
60
+ // non tabBar page
61
+ if (!(((_a = pagesJson.tabBar) === null || _a === void 0 ? void 0 : _a.list) || []).find((page) => page.pagePath === entryPagePath)) {
62
+ res.realEntryPagePath = realEntryPagePath;
63
+ }
64
+ }
65
+ }
66
+ catch (e) { }
67
+ }
68
+ return res;
69
+ }
@@ -1,4 +1,4 @@
1
1
  export * from './jsonFile';
2
2
  export { AppJson } from './types';
3
- export { parseMiniProgramPagesJson } from './pages';
3
+ export { mergeMiniProgramAppJson, parseMiniProgramPagesJson } from './pages';
4
4
  export { parseMiniProgramProjectJson } from './project';
@@ -10,9 +10,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
10
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.parseMiniProgramProjectJson = exports.parseMiniProgramPagesJson = void 0;
13
+ exports.parseMiniProgramProjectJson = exports.parseMiniProgramPagesJson = exports.mergeMiniProgramAppJson = void 0;
14
14
  __exportStar(require("./jsonFile"), exports);
15
15
  var pages_1 = require("./pages");
16
+ Object.defineProperty(exports, "mergeMiniProgramAppJson", { enumerable: true, get: function () { return pages_1.mergeMiniProgramAppJson; } });
16
17
  Object.defineProperty(exports, "parseMiniProgramPagesJson", { enumerable: true, get: function () { return pages_1.parseMiniProgramPagesJson; } });
17
18
  var project_1 = require("./project");
18
19
  Object.defineProperty(exports, "parseMiniProgramProjectJson", { enumerable: true, get: function () { return project_1.parseMiniProgramProjectJson; } });
@@ -46,7 +46,10 @@ function findChangedJsonFiles() {
46
46
  const usingComponents = newJson.usingComponents;
47
47
  // 格式化为相对路径,这样作为分包也可以直接运行
48
48
  Object.keys(usingComponents).forEach((name) => {
49
- usingComponents[name] = (0, resolve_1.relativeFile)(filename, usingComponents[name].slice(1));
49
+ const componentFilename = usingComponents[name];
50
+ if (componentFilename.startsWith('/')) {
51
+ usingComponents[name] = (0, resolve_1.relativeFile)(filename, componentFilename.slice(1));
52
+ }
50
53
  });
51
54
  const jsonStr = JSON.stringify(newJson, null, 2);
52
55
  if (jsonFilesCache.get(filename) !== jsonStr) {
@@ -13,4 +13,5 @@ export declare function parseMiniProgramPagesJson(jsonStr: string, platform: Uni
13
13
  pageJsons: Record<string, PageWindowOptions>;
14
14
  nvuePages: string[];
15
15
  };
16
+ export declare function mergeMiniProgramAppJson(appJson: Record<string, any>, platformJson?: Record<string, any>): void;
16
17
  export {};
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.parseMiniProgramPagesJson = void 0;
6
+ exports.mergeMiniProgramAppJson = exports.parseMiniProgramPagesJson = void 0;
7
7
  const fs_1 = __importDefault(require("fs"));
8
8
  const path_1 = __importDefault(require("path"));
9
9
  const shared_1 = require("@vue/shared");
@@ -11,10 +11,20 @@ const json_1 = require("../json");
11
11
  const pages_1 = require("../pages");
12
12
  const utils_1 = require("./utils");
13
13
  const utils_2 = require("../../utils");
14
+ const project_1 = require("./project");
14
15
  function parseMiniProgramPagesJson(jsonStr, platform, options = { subpackages: false }) {
15
16
  return parsePagesJson(jsonStr, platform, options);
16
17
  }
17
18
  exports.parseMiniProgramPagesJson = parseMiniProgramPagesJson;
19
+ function mergeMiniProgramAppJson(appJson, platformJson = {}) {
20
+ Object.keys(platformJson).forEach((name) => {
21
+ if (!(0, project_1.isMiniProgramProjectJsonKey)(name) &&
22
+ !['usingComponents', 'optimization'].includes(name)) {
23
+ appJson[name] = platformJson[name];
24
+ }
25
+ });
26
+ }
27
+ exports.mergeMiniProgramAppJson = mergeMiniProgramAppJson;
18
28
  function parsePagesJson(jsonStr, platform, { debug, darkmode, networkTimeout, subpackages, windowOptionsMap, tabBarOptionsMap, tabBarItemOptionsMap, } = {
19
29
  subpackages: false,
20
30
  }) {
@@ -4,5 +4,6 @@ interface ParseMiniProgramProjectJsonOptions {
4
4
  interface ProjectConfig {
5
5
  projectname: string;
6
6
  }
7
+ export declare function isMiniProgramProjectJsonKey(name: string): boolean;
7
8
  export declare function parseMiniProgramProjectJson(jsonStr: string, platform: UniApp.PLATFORM, { template }: ParseMiniProgramProjectJsonOptions): ProjectConfig;
8
9
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseMiniProgramProjectJson = void 0;
3
+ exports.parseMiniProgramProjectJson = exports.isMiniProgramProjectJsonKey = void 0;
4
4
  const shared_1 = require("@vue/shared");
5
5
  const json_1 = require("../json");
6
6
  const projectKeys = [
@@ -18,6 +18,10 @@ const projectKeys = [
18
18
  'scripts',
19
19
  'cloudbaseRoot',
20
20
  ];
21
+ function isMiniProgramProjectJsonKey(name) {
22
+ return projectKeys.includes(name);
23
+ }
24
+ exports.isMiniProgramProjectJsonKey = isMiniProgramProjectJsonKey;
21
25
  function parseMiniProgramProjectJson(jsonStr, platform, { template }) {
22
26
  const project = JSON.parse(JSON.stringify(template));
23
27
  const manifestJson = (0, json_1.parseJson)(jsonStr);
@@ -16,4 +16,5 @@ export declare const M: {
16
16
  'mp.component.args[0]': string;
17
17
  'mp.component.args[1]': string;
18
18
  'mp.360.unsupported': string;
19
+ 'file.notfound': string;
19
20
  };
@@ -19,4 +19,5 @@ exports.M = {
19
19
  'mp.component.args[0]': '{0}的第一个参数必须为静态字符串',
20
20
  'mp.component.args[1]': '{0}需要两个参数',
21
21
  'mp.360.unsupported': 'vue3暂不支持360小程序',
22
+ 'file.notfound': '{file} 文件不存在',
22
23
  };
@@ -2,3 +2,4 @@ export declare const COMPONENT_ON_LINK = "onVI";
2
2
  export declare const COMPONENT_BIND_LINK = "__l";
3
3
  export declare const COMPONENT_CUSTOM_HIDDEN = "data-c-h";
4
4
  export declare const COMPONENT_CUSTOM_HIDDEN_BIND: string;
5
+ export declare const MP_PLUGIN_JSON_NAME = "plugin.json";
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.COMPONENT_CUSTOM_HIDDEN_BIND = exports.COMPONENT_CUSTOM_HIDDEN = exports.COMPONENT_BIND_LINK = exports.COMPONENT_ON_LINK = void 0;
3
+ exports.MP_PLUGIN_JSON_NAME = exports.COMPONENT_CUSTOM_HIDDEN_BIND = exports.COMPONENT_CUSTOM_HIDDEN = exports.COMPONENT_BIND_LINK = exports.COMPONENT_ON_LINK = void 0;
4
4
  exports.COMPONENT_ON_LINK = 'onVI';
5
5
  exports.COMPONENT_BIND_LINK = '__l';
6
6
  exports.COMPONENT_CUSTOM_HIDDEN = 'data-c-h';
7
7
  exports.COMPONENT_CUSTOM_HIDDEN_BIND = 'bind:-' + exports.COMPONENT_CUSTOM_HIDDEN;
8
+ exports.MP_PLUGIN_JSON_NAME = 'plugin.json';
@@ -3,4 +3,5 @@ export * from './event';
3
3
  export * from './style';
4
4
  export * from './template';
5
5
  export * from './constants';
6
+ export { copyMiniProgramPluginJson } from './plugin';
6
7
  export { transformVueComponentImports } from './transformImports';
package/dist/mp/index.js CHANGED
@@ -10,11 +10,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
10
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.transformVueComponentImports = void 0;
13
+ exports.transformVueComponentImports = exports.copyMiniProgramPluginJson = void 0;
14
14
  __exportStar(require("./nvue"), exports);
15
15
  __exportStar(require("./event"), exports);
16
16
  __exportStar(require("./style"), exports);
17
17
  __exportStar(require("./template"), exports);
18
18
  __exportStar(require("./constants"), exports);
19
+ var plugin_1 = require("./plugin");
20
+ Object.defineProperty(exports, "copyMiniProgramPluginJson", { enumerable: true, get: function () { return plugin_1.copyMiniProgramPluginJson; } });
19
21
  var transformImports_1 = require("./transformImports");
20
22
  Object.defineProperty(exports, "transformVueComponentImports", { enumerable: true, get: function () { return transformImports_1.transformVueComponentImports; } });
@@ -0,0 +1,2 @@
1
+ import { UniViteCopyPluginTarget } from '../vite/plugins/copy';
2
+ export declare const copyMiniProgramPluginJson: UniViteCopyPluginTarget;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.copyMiniProgramPluginJson = void 0;
4
+ const json_1 = require("../json/json");
5
+ exports.copyMiniProgramPluginJson = {
6
+ src: ['plugin.json'],
7
+ get dest() {
8
+ return process.env.UNI_OUTPUT_DIR;
9
+ },
10
+ transform(source) {
11
+ return JSON.stringify((0, json_1.parseJson)(source.toString(), true), null, 2);
12
+ },
13
+ };
package/dist/resolve.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export declare function requireResolve(filename: string, basedir: string): string;
1
2
  export declare function relativeFile(from: string, to: string): string;
2
3
  export declare const resolveMainPathOnce: (inputDir: string) => string;
3
4
  export declare function getBuiltInPaths(): string[];
package/dist/resolve.js CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.resolveComponentsLibPath = exports.resolveBuiltIn = exports.getBuiltInPaths = exports.resolveMainPathOnce = exports.relativeFile = void 0;
6
+ exports.resolveComponentsLibPath = exports.resolveBuiltIn = exports.getBuiltInPaths = exports.resolveMainPathOnce = exports.relativeFile = exports.requireResolve = void 0;
7
7
  const fs_1 = __importDefault(require("fs"));
8
8
  const path_1 = __importDefault(require("path"));
9
9
  const debug_1 = __importDefault(require("debug"));
@@ -11,11 +11,15 @@ const resolve_1 = __importDefault(require("resolve"));
11
11
  const uni_shared_1 = require("@dcloudio/uni-shared");
12
12
  const utils_1 = require("./utils");
13
13
  const env_1 = require("./hbx/env");
14
- const DEFAULT_EXTENSIONS = ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json'];
14
+ const constants_1 = require("./constants");
15
+ function requireResolve(filename, basedir) {
16
+ return resolveWithSymlinks(filename, basedir);
17
+ }
18
+ exports.requireResolve = requireResolve;
15
19
  function resolveWithSymlinks(id, basedir) {
16
20
  return resolve_1.default.sync(id, {
17
21
  basedir,
18
- extensions: DEFAULT_EXTENSIONS,
22
+ extensions: constants_1.extensions,
19
23
  // necessary to work with pnpm
20
24
  preserveSymlinks: true,
21
25
  });
package/dist/url.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export declare function encodeBase64Url(str: string): string;
2
+ export declare function decodeBase64Url(str: string): string;
package/dist/url.js ADDED
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.decodeBase64Url = exports.encodeBase64Url = void 0;
7
+ const base64url_1 = __importDefault(require("base64url"));
8
+ function encodeBase64Url(str) {
9
+ return base64url_1.default.encode(str);
10
+ }
11
+ exports.encodeBase64Url = encodeBase64Url;
12
+ function decodeBase64Url(str) {
13
+ return base64url_1.default.decode(str);
14
+ }
15
+ exports.decodeBase64Url = decodeBase64Url;
@@ -17,11 +17,11 @@ function addVueRef(node, context) {
17
17
  return;
18
18
  }
19
19
  if (refProp.type === 6 /* ATTRIBUTE */) {
20
- refProp.name = 'data-' + utils_1.VUE_REF;
20
+ refProp.name = 'u-' + utils_1.VUE_REF;
21
21
  }
22
22
  else {
23
23
  ;
24
- refProp.arg.content = 'data-' + utils_1.VUE_REF;
24
+ refProp.arg.content = 'u-' + utils_1.VUE_REF;
25
25
  }
26
26
  return (0, utils_1.addStaticClass)(node,
27
27
  // ref-in-for
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-cli-shared",
3
- "version": "3.0.0-alpha-3030020211130002",
3
+ "version": "3.0.0-alpha-3030020211206001",
4
4
  "description": "@dcloudio/uni-cli-shared",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,13 +20,14 @@
20
20
  "dependencies": {
21
21
  "@babel/parser": "^7.15.0",
22
22
  "@babel/types": "^7.15.0",
23
- "@dcloudio/uni-i18n": "3.0.0-alpha-3030020211130002",
24
- "@dcloudio/uni-shared": "3.0.0-alpha-3030020211130002",
23
+ "@dcloudio/uni-i18n": "3.0.0-alpha-3030020211206001",
24
+ "@dcloudio/uni-shared": "3.0.0-alpha-3030020211206001",
25
25
  "@rollup/pluginutils": "^4.1.1",
26
26
  "@vue/compiler-core": "3.2.23",
27
27
  "@vue/compiler-dom": "3.2.23",
28
28
  "@vue/compiler-sfc": "3.2.23",
29
29
  "@vue/shared": "3.2.23",
30
+ "base64url": "^3.0.1",
30
31
  "chalk": "^4.1.1",
31
32
  "chokidar": "^3.5.2",
32
33
  "compare-versions": "^3.6.0",