@weapp-core/shared 3.5.3 → 3.5.4-dev.20261128.1

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.
@@ -7,12 +7,14 @@ var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
8
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod, mod.exports), cb = null), mod.exports);
9
9
  var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
- key = keys[i];
12
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
- get: ((k) => from[k]).bind(null, key),
14
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
- });
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) {
12
+ desc = __getOwnPropDesc(from, key);
13
+ __defProp(to, key, {
14
+ get: desc && desc.get && !desc.configurable ? desc.get : () => from[key],
15
+ enumerable: !desc || desc.enumerable
16
+ });
17
+ }
16
18
  }
17
19
  return to;
18
20
  };
@@ -39,13 +39,13 @@ declare function readJSON<T = unknown>(file: string, options?: JsonReadOptions):
39
39
  declare function readJsonSync<T = unknown>(file: string, options?: JsonReadOptions): T | null;
40
40
  declare function copy(src: string, dest: string, options?: CopyOptions): Promise<void>;
41
41
  declare function move(src: string, dest: string, options?: MoveOptions): Promise<void>;
42
- declare function close$1(handle: number | FileHandle): Promise<void>;
42
+ declare function close(handle: number | FileHandle): Promise<void>;
43
43
  export declare const fs: {
44
44
  Dirent: typeof Dirent;
45
45
  Stats: typeof Stats;
46
46
  access: typeof promises.access;
47
47
  appendFile: typeof appendFile;
48
- close: typeof close$1;
48
+ close: typeof close;
49
49
  closeSync: typeof closeSync;
50
50
  constants: typeof constants;
51
51
  copy: typeof copy;
package/dist/fs/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Dirent, Stats, close, closeSync, constants, existsSync, mkdirSync, openSync, promises, readFileSync, unlinkSync, utimesSync, watch, writeFileSync } from "node:fs";
1
+ import { Dirent, Stats, close as close$1, closeSync, constants, existsSync, mkdirSync, openSync, promises, readFileSync, unlinkSync, utimesSync, watch, writeFileSync } from "node:fs";
2
2
  import path from "node:path";
3
3
  // src/fs/index.ts
4
4
  function normalizeJsonEncoding(encoding) {
@@ -134,10 +134,10 @@ async function move(src, dest, options) {
134
134
  await remove(src);
135
135
  }
136
136
  }
137
- async function close$1(handle) {
137
+ async function close(handle) {
138
138
  if (typeof handle === "number") {
139
139
  await new Promise((resolve, reject) => {
140
- close(handle, (error) => {
140
+ close$1(handle, (error) => {
141
141
  if (error) {
142
142
  reject(error);
143
143
  return;
@@ -154,7 +154,7 @@ const fs = {
154
154
  Stats,
155
155
  access: promises.access,
156
156
  appendFile,
157
- close: close$1,
157
+ close,
158
158
  closeSync,
159
159
  constants,
160
160
  copy,
package/dist/index.js CHANGED
@@ -6,8 +6,8 @@ import { MINI_PROGRAM_PLATFORM_DESCRIPTORS } from "./platforms/descriptors.js";
6
6
  import { MINI_PROGRAM_PLATFORM_ALIASES, getDefaultMiniProgramPlatform, getDefaultMiniProgramRuntimeGlobalKey, getMiniProgramPlatformByRuntimeGlobalKey, getMiniProgramRouteRuntimeGlobalKeys, getMiniProgramRuntimeCapabilities, getMiniProgramRuntimeGlobalKey, getMiniProgramRuntimeGlobalKeys, getMiniProgramRuntimeGlobalKeysByResolvePriority, getMiniProgramRuntimeHostConfigKey, getSupportedMiniProgramPlatforms, normalizeMiniProgramPlatform, resolveMiniProgramPageKeys, resolveMiniProgramPlatform, supportsMiniProgramRuntimeCapability } from "./platforms/runtime/helpers.js";
7
7
  import { getMiniProgramAppTypesPackage, getMiniProgramDefaultBuildTarget, getMiniProgramNativeScriptModules, getMiniProgramPlatformDescriptor, getMiniProgramScriptModuleOptions, getMiniProgramTemplatePreset, getMiniProgramTemplateProjection, supportsMiniProgramAutoTouchAppStyle } from "./platforms/helpers.js";
8
8
  import { escapeWxmlAttribute, escapeWxmlText } from "./wxml.js";
9
- import { require_set_value } from "./node_modules/.pnpm/set-value@4.1.0/node_modules/set-value/index.js";
10
9
  import get from "get-value";
10
+ import { require_set_value } from "./node_modules/.pnpm/set-value@4.1.0/node_modules/set-value/index.js";
11
11
  // src/index.ts
12
12
  var import_set_value = /* @__PURE__ */ __toESM(require_set_value(), 1);
13
13
  const SPECIAL_CHARS_RE = /[|\\{}()[\]^$+*?.]/g;
package/dist/node.js CHANGED
@@ -41,13 +41,13 @@ function stableSerialize(value, seen = /* @__PURE__ */ new Map()) {
41
41
  }).join(",")}}`;
42
42
  }
43
43
  function xmur3(bytes, seed) {
44
- let hash = (1779033703 ^ bytes.length ^ seed) >>> 0;
44
+ let hash = (0x6a09e667 ^ bytes.length ^ seed) >>> 0;
45
45
  for (const byte of bytes) {
46
- hash = Math.imul(hash ^ byte, 3432918353);
46
+ hash = Math.imul(hash ^ byte, 0xcc9e2d51);
47
47
  hash = hash << 13 | hash >>> 19;
48
48
  }
49
- hash = Math.imul(hash ^ hash >>> 16, 2246822507);
50
- hash = Math.imul(hash ^ hash >>> 13, 3266489909);
49
+ hash = Math.imul(hash ^ hash >>> 16, 0x85ebca6b);
50
+ hash = Math.imul(hash ^ hash >>> 13, 0xc2b2ae35);
51
51
  return (hash ^ hash >>> 16) >>> 0;
52
52
  }
53
53
  /**
@@ -1,7 +1,7 @@
1
+ import { alipay, jd, swan, tt, weapp, xhs } from "@weapp-vite/wxml/presets";
1
2
  import { ALIPAY_RUNTIME_DESCRIPTOR, JD_RUNTIME_DESCRIPTOR, SWAN_RUNTIME_DESCRIPTOR, TT_RUNTIME_DESCRIPTOR, WEAPP_RUNTIME_DESCRIPTOR, XHS_RUNTIME_DESCRIPTOR } from "./runtime/descriptors.js";
2
3
  import { MINI_PROGRAM_DIRECTIVE_PREFIXES } from "./runtime/template.js";
3
4
  import { templateNativeScriptModules, templateOutputExtensions, templateScriptOptions } from "./template.js";
4
- import { alipay, jd, swan, tt, weapp, xhs } from "@weapp-vite/wxml/presets";
5
5
  // src/platforms/descriptors.ts
6
6
  const DEFAULT_PROJECT_CONFIG_ROOT_KEYS = ["miniprogramRoot", "srcMiniprogramRoot"];
7
7
  /**
@@ -1,8 +1,8 @@
1
1
  import { getMiniProgramDirectivePrefix, getSupportedMiniProgramDirectivePrefixes } from "./runtime/template.js";
2
+ import { getTemplatePreset, legacyScriptModuleRecipes } from "@weapp-vite/wxml/presets";
2
3
  import { MINI_PROGRAM_PLATFORM_DESCRIPTORS } from "./descriptors.js";
3
4
  import { MINI_PROGRAM_PLATFORM_ALIASES, getDefaultMiniProgramPlatform, getDefaultMiniProgramRuntimeGlobalKey, getMiniProgramPlatformByRuntimeGlobalKey, getMiniProgramRouteRuntimeGlobalKeys, getMiniProgramRuntimeCapabilities, getMiniProgramRuntimeDescriptor, getMiniProgramRuntimeGlobalKey, getMiniProgramRuntimeGlobalKeys, getMiniProgramRuntimeGlobalKeysByResolvePriority, getMiniProgramRuntimeHostConfigKey, getSupportedMiniProgramPlatforms, normalizeMiniProgramPlatform, resolveMiniProgramPageKeys, resolveMiniProgramPlatform, supportsMiniProgramRuntimeCapability } from "./runtime/helpers.js";
4
5
  import { templateNativeScriptModules } from "./template.js";
5
- import { getTemplatePreset, legacyScriptModuleRecipes } from "@weapp-vite/wxml/presets";
6
6
  // src/platforms/helpers.ts
7
7
  const MINI_PROGRAM_PLATFORM_DESCRIPTOR_BY_ID = new Map(MINI_PROGRAM_PLATFORM_DESCRIPTORS.map((descriptor) => [descriptor.id, descriptor]));
8
8
  const emptyNativeScriptModules = Object.freeze([]);
@@ -1,6 +1,6 @@
1
- import { ALLOWED_TAGS, isRecord, isSafeUrl, sanitizeRichTextStyle } from "./rich-text-shared.js";
2
- import { parseDocument } from "htmlparser2";
3
1
  import { decodeHTML } from "entities";
2
+ import { parseDocument } from "htmlparser2";
3
+ import { ALLOWED_TAGS, isRecord, isSafeUrl, sanitizeRichTextStyle } from "./rich-text-shared.js";
4
4
  // src/rich-text-native.ts
5
5
  const NATIVE_ALLOWED_TAGS = /* @__PURE__ */ new Set([
6
6
  ...ALLOWED_TAGS,
package/dist/rich-text.js CHANGED
@@ -1,6 +1,6 @@
1
+ import { parseDocument } from "htmlparser2";
1
2
  import { ALLOWED_TAGS, isRecord, isSafeUrl, sanitizeRichTextStyle } from "./rich-text-shared.js";
2
3
  import { normalizeNativeRichTextNodes, sanitizeNativeRichTextAttributes } from "./rich-text-native.js";
3
- import { parseDocument } from "htmlparser2";
4
4
  // src/rich-text.ts
5
5
  const ALLOWED_ATTRIBUTES = /* @__PURE__ */ new Set([
6
6
  "abbr",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@weapp-core/shared",
3
3
  "type": "module",
4
- "version": "3.5.3",
4
+ "version": "3.5.4-dev.20261128.1",
5
5
  "description": "Shared runtime-safe utilities and platform contracts for the weapp-vite ecosystem.",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -106,7 +106,7 @@
106
106
  },
107
107
  "dependencies": {
108
108
  "@types/set-value": "^4.0.3",
109
- "@weapp-vite/wxml": "0.0.5",
109
+ "@weapp-vite/wxml": "0.0.6-dev.20261128.1",
110
110
  "domhandler": "^6.0.1",
111
111
  "entities": "^9.0.0",
112
112
  "get-value": "^4.1.0",
@@ -114,7 +114,15 @@
114
114
  },
115
115
  "publishConfig": {
116
116
  "access": "public",
117
- "registry": "https://registry.npmjs.org"
117
+ "registry": "https://registry.npmjs.org/",
118
+ "tag": "snapshot-nightly"
119
+ },
120
+ "repoctlSnapshot": {
121
+ "kind": "nightly",
122
+ "commit": "ec17eeb0c156fc6691bcbaf95e8686ac419a6e94",
123
+ "buildId": "46104956345-1",
124
+ "identityKey": "f53748ff8746c04dadf1ec0a2e5eb10f2a35ae28f655c747062d631b66171144",
125
+ "tag": "snapshot-nightly"
118
126
  },
119
127
  "scripts": {
120
128
  "dev": "tsdown -w --sourcemap",
@@ -129,4 +137,4 @@
129
137
  "lint:fix": "eslint . --fix",
130
138
  "sync": "repo release sync-npmmirror --package @weapp-core/shared"
131
139
  }
132
- }
140
+ }