@immediately-run/sdk 0.49.0 → 0.51.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.
- package/dist/components/MainContent.cjs +16 -3
- package/dist/components/MainContent.cjs.map +1 -1
- package/dist/components/MainContent.js +16 -3
- package/dist/components/MainContent.js.map +1 -1
- package/dist/fs.cjs.map +1 -1
- package/dist/fs.js.map +1 -1
- package/dist/generated/protocol.d.cts +1 -0
- package/dist/generated/protocol.d.ts +1 -0
- package/dist/index.cjs +6 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -6
- package/dist/index.d.ts +4 -6
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/injectedBundler.cjs.map +1 -1
- package/dist/injectedBundler.d.cts +18 -2
- package/dist/injectedBundler.d.ts +18 -2
- package/dist/injectedBundler.js.map +1 -1
- package/dist/linkSpace.cjs +4 -36
- package/dist/linkSpace.cjs.map +1 -1
- package/dist/linkSpace.d.cts +3 -60
- package/dist/linkSpace.d.ts +3 -60
- package/dist/linkSpace.js +1 -33
- package/dist/linkSpace.js.map +1 -1
- package/dist/mounts.cjs.map +1 -1
- package/dist/mounts.js.map +1 -1
- package/dist/safeContent/SafeContent.cjs +2 -27
- package/dist/safeContent/SafeContent.cjs.map +1 -1
- package/dist/safeContent/SafeContent.d.cts +1 -13
- package/dist/safeContent/SafeContent.d.ts +1 -13
- package/dist/safeContent/SafeContent.js +1 -26
- package/dist/safeContent/SafeContent.js.map +1 -1
- package/dist/safeContent/index.cjs +3 -23
- package/dist/safeContent/index.cjs.map +1 -1
- package/dist/safeContent/index.d.cts +1 -6
- package/dist/safeContent/index.d.ts +1 -6
- package/dist/safeContent/index.js +1 -14
- package/dist/safeContent/index.js.map +1 -1
- package/dist/safeContent/mdastDeps.cjs +7 -2
- package/dist/safeContent/mdastDeps.js +7 -2
- package/dist/safeContent/parseSafeMdast.cjs +2 -53
- package/dist/safeContent/parseSafeMdast.cjs.map +1 -1
- package/dist/safeContent/parseSafeMdast.d.cts +1 -45
- package/dist/safeContent/parseSafeMdast.d.ts +1 -45
- package/dist/safeContent/parseSafeMdast.js +1 -42
- package/dist/safeContent/parseSafeMdast.js.map +1 -1
- package/dist/safeContent/renderMdast.cjs +2 -133
- package/dist/safeContent/renderMdast.cjs.map +1 -1
- package/dist/safeContent/renderMdast.d.cts +1 -27
- package/dist/safeContent/renderMdast.d.ts +1 -27
- package/dist/safeContent/renderMdast.js +1 -132
- package/dist/safeContent/renderMdast.js.map +1 -1
- package/dist/safeContent/sanitizeUrl.cjs +2 -12
- package/dist/safeContent/sanitizeUrl.cjs.map +1 -1
- package/dist/safeContent/sanitizeUrl.d.cts +1 -9
- package/dist/safeContent/sanitizeUrl.d.ts +1 -9
- package/dist/safeContent/sanitizeUrl.js +1 -11
- package/dist/safeContent/sanitizeUrl.js.map +1 -1
- package/dist/safeContent/wikilink.cjs +3 -35
- package/dist/safeContent/wikilink.cjs.map +1 -1
- package/dist/safeContent/wikilink.d.cts +1 -21
- package/dist/safeContent/wikilink.d.ts +1 -21
- package/dist/safeContent/wikilink.js +1 -33
- package/dist/safeContent/wikilink.js.map +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.cjs.map +1 -1
- package/dist/version.d.cts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +9 -5
|
@@ -1,9 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Return the URL if its scheme is allowed (or it is relative/anchor), else
|
|
3
|
-
* `undefined`. Control chars are stripped first so an obfuscated scheme cannot slip
|
|
4
|
-
* past. A protocol-relative `//host` URL is treated as relative-with-authority and
|
|
5
|
-
* allowed (it inherits the page's https scheme).
|
|
6
|
-
*/
|
|
7
|
-
declare function sanitizeUrl(url: unknown): string | undefined;
|
|
8
|
-
|
|
9
|
-
export { sanitizeUrl };
|
|
1
|
+
export { sanitizeUrl } from '@immediately-run/safe-content';
|
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
import "../chunk-VHAA22YE.js";
|
|
2
|
-
|
|
3
|
-
const ALLOWED_SCHEMES = /* @__PURE__ */ new Set(["http", "https", "mailto"]);
|
|
4
|
-
const CONTROL_CHARS = /[\u0000-\u001F\u007F]/g;
|
|
5
|
-
function sanitizeUrl(url) {
|
|
6
|
-
if (typeof url !== "string") return void 0;
|
|
7
|
-
const cleaned = url.replace(CONTROL_CHARS, "").trim();
|
|
8
|
-
if (cleaned === "") return void 0;
|
|
9
|
-
const m = SCHEME.exec(cleaned);
|
|
10
|
-
if (!m) return cleaned;
|
|
11
|
-
return ALLOWED_SCHEMES.has(m[1].toLowerCase()) ? cleaned : void 0;
|
|
12
|
-
}
|
|
2
|
+
import { sanitizeUrl } from "@immediately-run/safe-content";
|
|
13
3
|
export {
|
|
14
4
|
sanitizeUrl
|
|
15
5
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/safeContent/sanitizeUrl.ts"],"sourcesContent":["//
|
|
1
|
+
{"version":3,"sources":["../../src/safeContent/sanitizeUrl.ts"],"sourcesContent":["// R3-279 (phase 3): re-export shim — the implementation lives in\n// `@immediately-run/safe-content`; this subpath keeps working byte-compatibly.\nexport { sanitizeUrl } from '@immediately-run/safe-content';\n"],"mappings":";AAEA,SAAS,mBAAmB;","names":[]}
|
|
@@ -18,43 +18,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var wikilink_exports = {};
|
|
20
20
|
__export(wikilink_exports, {
|
|
21
|
-
parseWikiInner: () => parseWikiInner,
|
|
22
|
-
splitWikiLinks: () => splitWikiLinks
|
|
21
|
+
parseWikiInner: () => import_safe_content.parseWikiInner,
|
|
22
|
+
splitWikiLinks: () => import_safe_content.splitWikiLinks
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(wikilink_exports);
|
|
25
|
-
|
|
26
|
-
function parseWikiInner(inner) {
|
|
27
|
-
const pipe = inner.indexOf("|");
|
|
28
|
-
let target;
|
|
29
|
-
let label;
|
|
30
|
-
if (pipe === -1) {
|
|
31
|
-
target = inner.trim();
|
|
32
|
-
} else {
|
|
33
|
-
label = inner.slice(0, pipe).trim();
|
|
34
|
-
target = inner.slice(pipe + 1).trim();
|
|
35
|
-
}
|
|
36
|
-
if (target === "") return null;
|
|
37
|
-
return label ? { target, label } : { target };
|
|
38
|
-
}
|
|
39
|
-
function splitWikiLinks(value) {
|
|
40
|
-
if (value.indexOf("[[") === -1) return null;
|
|
41
|
-
const out = [];
|
|
42
|
-
let lastIndex = 0;
|
|
43
|
-
let produced = false;
|
|
44
|
-
WIKILINK.lastIndex = 0;
|
|
45
|
-
let match;
|
|
46
|
-
while ((match = WIKILINK.exec(value)) !== null) {
|
|
47
|
-
const token = parseWikiInner(match[1]);
|
|
48
|
-
if (!token) continue;
|
|
49
|
-
if (match.index > lastIndex) out.push({ text: value.slice(lastIndex, match.index) });
|
|
50
|
-
out.push({ wiki: token });
|
|
51
|
-
lastIndex = match.index + match[0].length;
|
|
52
|
-
produced = true;
|
|
53
|
-
}
|
|
54
|
-
if (!produced) return null;
|
|
55
|
-
if (lastIndex < value.length) out.push({ text: value.slice(lastIndex) });
|
|
56
|
-
return out;
|
|
57
|
-
}
|
|
25
|
+
var import_safe_content = require("@immediately-run/safe-content");
|
|
58
26
|
// Annotate the CommonJS export names for ESM import in node:
|
|
59
27
|
0 && (module.exports = {
|
|
60
28
|
parseWikiInner,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/safeContent/wikilink.ts"],"sourcesContent":["//
|
|
1
|
+
{"version":3,"sources":["../../src/safeContent/wikilink.ts"],"sourcesContent":["// R3-279 (phase 3): re-export shim — the implementation lives in\n// `@immediately-run/safe-content`; this subpath keeps working byte-compatibly.\nexport { splitWikiLinks, parseWikiInner } from '@immediately-run/safe-content';\nexport type { WikiLinkToken, WikiPart } from '@immediately-run/safe-content';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,0BAA+C;","names":[]}
|
|
@@ -1,21 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/** The raw target path, verbatim (relative or absolute; resolved in-mount only). */
|
|
3
|
-
target: string;
|
|
4
|
-
/** The explicit label, or undefined (the component derives one). */
|
|
5
|
-
label?: string;
|
|
6
|
-
}
|
|
7
|
-
type WikiPart = {
|
|
8
|
-
text: string;
|
|
9
|
-
} | {
|
|
10
|
-
wiki: WikiLinkToken;
|
|
11
|
-
};
|
|
12
|
-
/** Parse the `[[label|target]]` / `[[target]]` inner text (label first, then target
|
|
13
|
-
* — the §13.1 order), or `null` for an empty target (leave the literal `[[…]]`). */
|
|
14
|
-
declare function parseWikiInner(inner: string): WikiLinkToken | null;
|
|
15
|
-
/**
|
|
16
|
-
* Split a text string on its `[[…]]` runs into ordered text / wiki parts, or `null`
|
|
17
|
-
* when there is no usable wiki-link (so the caller keeps the text node untouched).
|
|
18
|
-
*/
|
|
19
|
-
declare function splitWikiLinks(value: string): WikiPart[] | null;
|
|
20
|
-
|
|
21
|
-
export { type WikiLinkToken, type WikiPart, parseWikiInner, splitWikiLinks };
|
|
1
|
+
export { WikiLinkToken, WikiPart, parseWikiInner, splitWikiLinks } from '@immediately-run/safe-content';
|
|
@@ -1,21 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/** The raw target path, verbatim (relative or absolute; resolved in-mount only). */
|
|
3
|
-
target: string;
|
|
4
|
-
/** The explicit label, or undefined (the component derives one). */
|
|
5
|
-
label?: string;
|
|
6
|
-
}
|
|
7
|
-
type WikiPart = {
|
|
8
|
-
text: string;
|
|
9
|
-
} | {
|
|
10
|
-
wiki: WikiLinkToken;
|
|
11
|
-
};
|
|
12
|
-
/** Parse the `[[label|target]]` / `[[target]]` inner text (label first, then target
|
|
13
|
-
* — the §13.1 order), or `null` for an empty target (leave the literal `[[…]]`). */
|
|
14
|
-
declare function parseWikiInner(inner: string): WikiLinkToken | null;
|
|
15
|
-
/**
|
|
16
|
-
* Split a text string on its `[[…]]` runs into ordered text / wiki parts, or `null`
|
|
17
|
-
* when there is no usable wiki-link (so the caller keeps the text node untouched).
|
|
18
|
-
*/
|
|
19
|
-
declare function splitWikiLinks(value: string): WikiPart[] | null;
|
|
20
|
-
|
|
21
|
-
export { type WikiLinkToken, type WikiPart, parseWikiInner, splitWikiLinks };
|
|
1
|
+
export { WikiLinkToken, WikiPart, parseWikiInner, splitWikiLinks } from '@immediately-run/safe-content';
|
|
@@ -1,37 +1,5 @@
|
|
|
1
1
|
import "../chunk-VHAA22YE.js";
|
|
2
|
-
|
|
3
|
-
function parseWikiInner(inner) {
|
|
4
|
-
const pipe = inner.indexOf("|");
|
|
5
|
-
let target;
|
|
6
|
-
let label;
|
|
7
|
-
if (pipe === -1) {
|
|
8
|
-
target = inner.trim();
|
|
9
|
-
} else {
|
|
10
|
-
label = inner.slice(0, pipe).trim();
|
|
11
|
-
target = inner.slice(pipe + 1).trim();
|
|
12
|
-
}
|
|
13
|
-
if (target === "") return null;
|
|
14
|
-
return label ? { target, label } : { target };
|
|
15
|
-
}
|
|
16
|
-
function splitWikiLinks(value) {
|
|
17
|
-
if (value.indexOf("[[") === -1) return null;
|
|
18
|
-
const out = [];
|
|
19
|
-
let lastIndex = 0;
|
|
20
|
-
let produced = false;
|
|
21
|
-
WIKILINK.lastIndex = 0;
|
|
22
|
-
let match;
|
|
23
|
-
while ((match = WIKILINK.exec(value)) !== null) {
|
|
24
|
-
const token = parseWikiInner(match[1]);
|
|
25
|
-
if (!token) continue;
|
|
26
|
-
if (match.index > lastIndex) out.push({ text: value.slice(lastIndex, match.index) });
|
|
27
|
-
out.push({ wiki: token });
|
|
28
|
-
lastIndex = match.index + match[0].length;
|
|
29
|
-
produced = true;
|
|
30
|
-
}
|
|
31
|
-
if (!produced) return null;
|
|
32
|
-
if (lastIndex < value.length) out.push({ text: value.slice(lastIndex) });
|
|
33
|
-
return out;
|
|
34
|
-
}
|
|
2
|
+
import { splitWikiLinks, parseWikiInner } from "@immediately-run/safe-content";
|
|
35
3
|
export {
|
|
36
4
|
parseWikiInner,
|
|
37
5
|
splitWikiLinks
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/safeContent/wikilink.ts"],"sourcesContent":["//
|
|
1
|
+
{"version":3,"sources":["../../src/safeContent/wikilink.ts"],"sourcesContent":["// R3-279 (phase 3): re-export shim — the implementation lives in\n// `@immediately-run/safe-content`; this subpath keeps working byte-compatibly.\nexport { splitWikiLinks, parseWikiInner } from '@immediately-run/safe-content';\nexport type { WikiLinkToken, WikiPart } from '@immediately-run/safe-content';\n"],"mappings":";AAEA,SAAS,gBAAgB,sBAAsB;","names":[]}
|
package/dist/version.cjs
CHANGED
|
@@ -21,7 +21,7 @@ __export(version_exports, {
|
|
|
21
21
|
SDK_VERSION: () => SDK_VERSION
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(version_exports);
|
|
24
|
-
const SDK_VERSION = "0.
|
|
24
|
+
const SDK_VERSION = "0.51.0";
|
|
25
25
|
// Annotate the CommonJS export names for ESM import in node:
|
|
26
26
|
0 && (module.exports = {
|
|
27
27
|
SDK_VERSION
|
package/dist/version.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/version.ts"],"sourcesContent":["// GENERATED by scripts/gen-version.mjs from package.json — do not edit by hand.\n// Regenerated on every build (prebuild); kept honest by version.test.ts.\n\n/** This SDK's package version, baked from package.json at build (SP2-6). */\nexport const SDK_VERSION = '0.
|
|
1
|
+
{"version":3,"sources":["../src/version.ts"],"sourcesContent":["// GENERATED by scripts/gen-version.mjs from package.json — do not edit by hand.\n// Regenerated on every build (prebuild); kept honest by version.test.ts.\n\n/** This SDK's package version, baked from package.json at build (SP2-6). */\nexport const SDK_VERSION = '0.51.0';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,MAAM,cAAc;","names":[]}
|
package/dist/version.d.cts
CHANGED
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/dist/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/version.ts"],"sourcesContent":["// GENERATED by scripts/gen-version.mjs from package.json — do not edit by hand.\n// Regenerated on every build (prebuild); kept honest by version.test.ts.\n\n/** This SDK's package version, baked from package.json at build (SP2-6). */\nexport const SDK_VERSION = '0.
|
|
1
|
+
{"version":3,"sources":["../src/version.ts"],"sourcesContent":["// GENERATED by scripts/gen-version.mjs from package.json — do not edit by hand.\n// Regenerated on every build (prebuild); kept honest by version.test.ts.\n\n/** This SDK's package version, baked from package.json at build (SP2-6). */\nexport const SDK_VERSION = '0.51.0';\n"],"mappings":";AAIO,MAAM,cAAc;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@immediately-run/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.0",
|
|
4
4
|
"description": "Runtime SDK for code executing inside an immediately.run sandbox.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "github:immediately-run/immediately-run-sdk",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"protocol:check": "node scripts/check-protocol-snapshot.mjs",
|
|
37
37
|
"verify:codegen-parity": "node scripts/codegen-prototype/verify-drift.mjs --self-test && node scripts/codegen-prototype/verify-drift.mjs && node scripts/codegen-prototype/verify.streams.mjs --self-test && node scripts/codegen-prototype/verify.streams.mjs",
|
|
38
38
|
"api:update": "node scripts/check-api-stability.mjs --update",
|
|
39
|
-
"verify": "npm run format:check && npm run check:circular && npm run build && npm test && npm run test:safe-content && npm run test:metadata-e2e && npm run api:check && npm run compat:selftest && npm run compat:previous && npm run protocol:check && npm run protocol:selftest && npm run check:ambient:selftest && npm run check:ambient && npm run check:selfhost:selftest && npm run check:selfhost && npm run verify:codegen-parity",
|
|
39
|
+
"verify": "npm run format:check && npm run check:circular && npm run check:bundler:selftest && npm run check:bundler && npm run build && npm test && npm run test:safe-content && npm run test:metadata-e2e && npm run api:check && npm run compat:selftest && npm run compat:previous && npm run protocol:check && npm run protocol:selftest && npm run check:ambient:selftest && npm run check:ambient && npm run check:selfhost:selftest && npm run check:selfhost && npm run verify:codegen-parity",
|
|
40
40
|
"docs": "typedoc --json docs/api.json && node scripts/gen-llms.mjs",
|
|
41
41
|
"prepublishOnly": "npm run check:circular && npm run build && npm run api:check",
|
|
42
42
|
"test:safe-content": "node scripts/build-safecontent-e2e.mjs && node --test test/safeContent.e2e.mjs",
|
|
@@ -47,6 +47,8 @@
|
|
|
47
47
|
"check:selfhost": "node scripts/build-selfhost.mjs .selfhost-check && node scripts/check-selfhost-resolvable.mjs --dir .selfhost-check",
|
|
48
48
|
"check:selfhost:selftest": "node scripts/check-selfhost-resolvable.mjs --self-test",
|
|
49
49
|
"prepare": "git config core.hooksPath .githooks || true",
|
|
50
|
+
"check:bundler": "node scripts/check-bundler-reads.mjs",
|
|
51
|
+
"check:bundler:selftest": "node scripts/check-bundler-reads.mjs --self-test",
|
|
50
52
|
"check:ambient": "node scripts/check-ambient-types.mjs",
|
|
51
53
|
"check:ambient:selftest": "node scripts/check-ambient-types.mjs --self-test"
|
|
52
54
|
},
|
|
@@ -57,10 +59,11 @@
|
|
|
57
59
|
"dependencies": {
|
|
58
60
|
"@immediately-run/platform-constants": "0.2.0",
|
|
59
61
|
"@immediately-run/sandbox-protocol": "0.4.0",
|
|
60
|
-
"react-error-boundary": "^6.0.0"
|
|
62
|
+
"react-error-boundary": "^6.0.0",
|
|
63
|
+
"@immediately-run/safe-content": "0.1.0",
|
|
64
|
+
"@immediately-run/mdx-plugins": "0.5.0"
|
|
61
65
|
},
|
|
62
66
|
"devDependencies": {
|
|
63
|
-
"@immediately-run/mdx-plugins": "^0.1.0",
|
|
64
67
|
"@immediately-run/prettier-config": "0.1.0",
|
|
65
68
|
"@testing-library/dom": "^10.4.1",
|
|
66
69
|
"@testing-library/react": "^16.3.2",
|
|
@@ -83,7 +86,8 @@
|
|
|
83
86
|
"ts-node": "^10.9.2",
|
|
84
87
|
"tsup": "^8.0.0",
|
|
85
88
|
"typedoc": "^0.27.0",
|
|
86
|
-
"typescript": "^5.6.0"
|
|
89
|
+
"typescript": "^5.6.0",
|
|
90
|
+
"unified": "^11.0.5"
|
|
87
91
|
},
|
|
88
92
|
"prettier": "@immediately-run/prettier-config"
|
|
89
93
|
}
|