@osdk/widget.vite-plugin 3.5.0-beta.14 → 3.5.0-beta.16
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/CHANGELOG.md +16 -0
- package/build/site/assets/{allPaths-DIfrnzgS.js → allPaths-DQ44lpsR.js} +1 -1
- package/build/site/assets/{allPathsLoader-D2qNtTEN.js → allPathsLoader-DxfybG1q.js} +2 -2
- package/build/site/assets/index-BAmk2r3A.css +1 -0
- package/build/site/assets/index-y3oyBPN4.js +8 -0
- package/build/site/assets/{splitPathsBySizeLoader-CuGV5Hrn.js → splitPathsBySizeLoader-B7rF-lK3.js} +1 -1
- package/build/site/index.html +2 -2
- package/package.json +6 -6
- package/build/esm/build-plugin/__tests__/buildWidgetSetManifest.test.js +0 -205
- package/build/esm/build-plugin/__tests__/buildWidgetSetManifest.test.js.map +0 -1
- package/build/esm/build-plugin/__tests__/extractBuildOutputs.test.js +0 -133
- package/build/esm/build-plugin/__tests__/extractBuildOutputs.test.js.map +0 -1
- package/build/esm/build-plugin/__tests__/getWidgetBuildOutputs.test.js +0 -153
- package/build/esm/build-plugin/__tests__/getWidgetBuildOutputs.test.js.map +0 -1
- package/build/esm/build-plugin/__tests__/getWidgetSetInputSpec.test.js +0 -96
- package/build/esm/build-plugin/__tests__/getWidgetSetInputSpec.test.js.map +0 -1
- package/build/esm/build-plugin/__tests__/isConfigFile.test.js +0 -26
- package/build/esm/build-plugin/__tests__/isConfigFile.test.js.map +0 -1
- package/build/esm/build-plugin/__tests__/validateWidgetSet.test.js +0 -44
- package/build/esm/build-plugin/__tests__/validateWidgetSet.test.js.map +0 -1
- package/build/esm/common/__tests__/extractWidgetConfig.test.js +0 -95
- package/build/esm/common/__tests__/extractWidgetConfig.test.js.map +0 -1
- package/build/esm/common/__tests__/getInputHtmlEntrypoints.test.js +0 -38
- package/build/esm/common/__tests__/getInputHtmlEntrypoints.test.js.map +0 -1
- package/build/esm/common/__tests__/standardizePathAndFileExtension.test.js +0 -77
- package/build/esm/common/__tests__/standardizePathAndFileExtension.test.js.map +0 -1
- package/build/esm/common/__tests__/validateWidgetConfig.test.js +0 -151
- package/build/esm/common/__tests__/validateWidgetConfig.test.js.map +0 -1
- package/build/esm/common/__tests__/visitNpmPackages.test.js +0 -74
- package/build/esm/common/__tests__/visitNpmPackages.test.js.map +0 -1
- package/build/esm/dev-plugin/__tests__/codeWorkspacesMode.test.js +0 -87
- package/build/esm/dev-plugin/__tests__/codeWorkspacesMode.test.js.map +0 -1
- package/build/esm/dev-plugin/__tests__/extractInjectedScripts.test.js +0 -34
- package/build/esm/dev-plugin/__tests__/extractInjectedScripts.test.js.map +0 -1
- package/build/esm/dev-plugin/__tests__/getBaseHref.test.js +0 -48
- package/build/esm/dev-plugin/__tests__/getBaseHref.test.js.map +0 -1
- package/build/esm/dev-plugin/__tests__/getWidgetIdOverrideMap.test.js +0 -71
- package/build/esm/dev-plugin/__tests__/getWidgetIdOverrideMap.test.js.map +0 -1
- package/build/esm/dev-plugin/__tests__/validateDevEnvironment.test.js +0 -66
- package/build/esm/dev-plugin/__tests__/validateDevEnvironment.test.js.map +0 -1
- package/build/site/assets/index-7niI6nVb.css +0 -1
- package/build/site/assets/index-D6Sm-vP3.js +0 -44
- package/build/types/build-plugin/__tests__/buildWidgetSetManifest.test.d.ts +0 -1
- package/build/types/build-plugin/__tests__/buildWidgetSetManifest.test.d.ts.map +0 -1
- package/build/types/build-plugin/__tests__/extractBuildOutputs.test.d.ts +0 -1
- package/build/types/build-plugin/__tests__/extractBuildOutputs.test.d.ts.map +0 -1
- package/build/types/build-plugin/__tests__/getWidgetBuildOutputs.test.d.ts +0 -1
- package/build/types/build-plugin/__tests__/getWidgetBuildOutputs.test.d.ts.map +0 -1
- package/build/types/build-plugin/__tests__/getWidgetSetInputSpec.test.d.ts +0 -1
- package/build/types/build-plugin/__tests__/getWidgetSetInputSpec.test.d.ts.map +0 -1
- package/build/types/build-plugin/__tests__/isConfigFile.test.d.ts +0 -1
- package/build/types/build-plugin/__tests__/isConfigFile.test.d.ts.map +0 -1
- package/build/types/build-plugin/__tests__/validateWidgetSet.test.d.ts +0 -1
- package/build/types/build-plugin/__tests__/validateWidgetSet.test.d.ts.map +0 -1
- package/build/types/common/__tests__/extractWidgetConfig.test.d.ts +0 -1
- package/build/types/common/__tests__/extractWidgetConfig.test.d.ts.map +0 -1
- package/build/types/common/__tests__/getInputHtmlEntrypoints.test.d.ts +0 -1
- package/build/types/common/__tests__/getInputHtmlEntrypoints.test.d.ts.map +0 -1
- package/build/types/common/__tests__/standardizePathAndFileExtension.test.d.ts +0 -1
- package/build/types/common/__tests__/standardizePathAndFileExtension.test.d.ts.map +0 -1
- package/build/types/common/__tests__/validateWidgetConfig.test.d.ts +0 -1
- package/build/types/common/__tests__/validateWidgetConfig.test.d.ts.map +0 -1
- package/build/types/common/__tests__/visitNpmPackages.test.d.ts +0 -1
- package/build/types/common/__tests__/visitNpmPackages.test.d.ts.map +0 -1
- package/build/types/dev-plugin/__tests__/codeWorkspacesMode.test.d.ts +0 -1
- package/build/types/dev-plugin/__tests__/codeWorkspacesMode.test.d.ts.map +0 -1
- package/build/types/dev-plugin/__tests__/extractInjectedScripts.test.d.ts +0 -1
- package/build/types/dev-plugin/__tests__/extractInjectedScripts.test.d.ts.map +0 -1
- package/build/types/dev-plugin/__tests__/getBaseHref.test.d.ts +0 -1
- package/build/types/dev-plugin/__tests__/getBaseHref.test.d.ts.map +0 -1
- package/build/types/dev-plugin/__tests__/getWidgetIdOverrideMap.test.d.ts +0 -1
- package/build/types/dev-plugin/__tests__/getWidgetIdOverrideMap.test.d.ts.map +0 -1
- package/build/types/dev-plugin/__tests__/validateDevEnvironment.test.d.ts +0 -1
- package/build/types/dev-plugin/__tests__/validateDevEnvironment.test.d.ts.map +0 -1
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import { readFile } from "fs/promises";
|
|
18
|
-
import resolvePackagePath from "resolve-package-path";
|
|
19
|
-
import { expect, test, vi } from "vitest";
|
|
20
|
-
import { visitNpmPackages } from "../visitNpmPackages.js";
|
|
21
|
-
vi.mock("fs/promises");
|
|
22
|
-
vi.mock("resolve-package-path");
|
|
23
|
-
test("visitNpmPackages", async () => {
|
|
24
|
-
const packageJson1 = {
|
|
25
|
-
name: "package1",
|
|
26
|
-
version: "0.1.0",
|
|
27
|
-
dependencies: {
|
|
28
|
-
"package2": "0.2.0",
|
|
29
|
-
"package3": "0.3.0"
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
const packageJson2 = {
|
|
33
|
-
name: "package2",
|
|
34
|
-
version: "0.2.0",
|
|
35
|
-
dependencies: {
|
|
36
|
-
"package3": "0.3.0"
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
const packageJson3 = {
|
|
40
|
-
name: "package3",
|
|
41
|
-
version: "0.3.0"
|
|
42
|
-
};
|
|
43
|
-
const packageJsonPaths = {
|
|
44
|
-
[packageJson1.name]: "/path/to/package.json",
|
|
45
|
-
[packageJson2.name]: "/path/to/node_modules/package2/package.json",
|
|
46
|
-
[packageJson3.name]: "/path/to/node_modules/package3/package.json"
|
|
47
|
-
};
|
|
48
|
-
const packageJsons = {
|
|
49
|
-
[packageJsonPaths[packageJson1.name]]: packageJson1,
|
|
50
|
-
[packageJsonPaths[packageJson2.name]]: packageJson2,
|
|
51
|
-
[packageJsonPaths[packageJson3.name]]: packageJson3
|
|
52
|
-
};
|
|
53
|
-
vi.mocked(resolvePackagePath).mockImplementation(target => {
|
|
54
|
-
const path = packageJsonPaths[target];
|
|
55
|
-
if (path == null) {
|
|
56
|
-
throw new Error(`Unexpected target: ${target}`);
|
|
57
|
-
}
|
|
58
|
-
return path;
|
|
59
|
-
});
|
|
60
|
-
vi.mocked(readFile).mockImplementation(path => {
|
|
61
|
-
const packageJson = packageJsons[path.toString()];
|
|
62
|
-
if (packageJson == null) {
|
|
63
|
-
throw new Error(`Unexpected path: ${path.toString()}`);
|
|
64
|
-
}
|
|
65
|
-
return Promise.resolve(JSON.stringify(packageJson));
|
|
66
|
-
});
|
|
67
|
-
const onVisit = vi.fn();
|
|
68
|
-
await visitNpmPackages("/path/to/package.json", onVisit);
|
|
69
|
-
expect(onVisit).toHaveBeenCalledTimes(3);
|
|
70
|
-
expect(onVisit).toHaveBeenNthCalledWith(1, "/path/to/package.json", packageJson1);
|
|
71
|
-
expect(onVisit).toHaveBeenNthCalledWith(2, "/path/to/node_modules/package2/package.json", packageJson2);
|
|
72
|
-
expect(onVisit).toHaveBeenNthCalledWith(3, "/path/to/node_modules/package3/package.json", packageJson3);
|
|
73
|
-
});
|
|
74
|
-
//# sourceMappingURL=visitNpmPackages.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"visitNpmPackages.test.js","names":["readFile","resolvePackagePath","expect","test","vi","visitNpmPackages","mock","packageJson1","name","version","dependencies","packageJson2","packageJson3","packageJsonPaths","packageJsons","mocked","mockImplementation","target","path","Error","packageJson","toString","Promise","resolve","JSON","stringify","onVisit","fn","toHaveBeenCalledTimes","toHaveBeenNthCalledWith"],"sources":["visitNpmPackages.test.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { readFile } from \"fs/promises\";\nimport resolvePackagePath from \"resolve-package-path\";\nimport { expect, test, vi } from \"vitest\";\nimport type { PackageJson } from \"../../common/PackageJson.js\";\nimport { visitNpmPackages } from \"../visitNpmPackages.js\";\n\nvi.mock(\"fs/promises\");\nvi.mock(\"resolve-package-path\");\n\ntest(\"visitNpmPackages\", async () => {\n const packageJson1: PackageJson = {\n name: \"package1\",\n version: \"0.1.0\",\n dependencies: {\n \"package2\": \"0.2.0\",\n \"package3\": \"0.3.0\",\n },\n };\n const packageJson2: PackageJson = {\n name: \"package2\",\n version: \"0.2.0\",\n dependencies: {\n \"package3\": \"0.3.0\",\n },\n };\n const packageJson3: PackageJson = {\n name: \"package3\",\n version: \"0.3.0\",\n };\n\n const packageJsonPaths: Record<string, string> = {\n [packageJson1.name]: \"/path/to/package.json\",\n [packageJson2.name]: \"/path/to/node_modules/package2/package.json\",\n [packageJson3.name]: \"/path/to/node_modules/package3/package.json\",\n } as const;\n const packageJsons: Record<typeof packageJsonPaths[string], PackageJson> = {\n [packageJsonPaths[packageJson1.name]]: packageJson1,\n [packageJsonPaths[packageJson2.name]]: packageJson2,\n [packageJsonPaths[packageJson3.name]]: packageJson3,\n } as const;\n\n vi.mocked(resolvePackagePath).mockImplementation((target) => {\n const path = packageJsonPaths[target];\n if (path == null) {\n throw new Error(`Unexpected target: ${target}`);\n }\n return path;\n });\n vi.mocked(readFile).mockImplementation((path) => {\n const packageJson = packageJsons[path.toString()];\n if (packageJson == null) {\n throw new Error(`Unexpected path: ${path.toString()}`);\n }\n return Promise.resolve(JSON.stringify(packageJson));\n });\n\n const onVisit = vi.fn();\n await visitNpmPackages(\"/path/to/package.json\", onVisit);\n\n expect(onVisit).toHaveBeenCalledTimes(3);\n expect(onVisit).toHaveBeenNthCalledWith(\n 1,\n \"/path/to/package.json\",\n packageJson1,\n );\n expect(onVisit).toHaveBeenNthCalledWith(\n 2,\n \"/path/to/node_modules/package2/package.json\",\n packageJson2,\n );\n expect(onVisit).toHaveBeenNthCalledWith(\n 3,\n \"/path/to/node_modules/package3/package.json\",\n packageJson3,\n );\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,QAAQ,aAAa;AACtC,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,SAASC,MAAM,EAAEC,IAAI,EAAEC,EAAE,QAAQ,QAAQ;AAEzC,SAASC,gBAAgB,QAAQ,wBAAwB;AAEzDD,EAAE,CAACE,IAAI,CAAC,aAAa,CAAC;AACtBF,EAAE,CAACE,IAAI,CAAC,sBAAsB,CAAC;AAE/BH,IAAI,CAAC,kBAAkB,EAAE,YAAY;EACnC,MAAMI,YAAyB,GAAG;IAChCC,IAAI,EAAE,UAAU;IAChBC,OAAO,EAAE,OAAO;IAChBC,YAAY,EAAE;MACZ,UAAU,EAAE,OAAO;MACnB,UAAU,EAAE;IACd;EACF,CAAC;EACD,MAAMC,YAAyB,GAAG;IAChCH,IAAI,EAAE,UAAU;IAChBC,OAAO,EAAE,OAAO;IAChBC,YAAY,EAAE;MACZ,UAAU,EAAE;IACd;EACF,CAAC;EACD,MAAME,YAAyB,GAAG;IAChCJ,IAAI,EAAE,UAAU;IAChBC,OAAO,EAAE;EACX,CAAC;EAED,MAAMI,gBAAwC,GAAG;IAC/C,CAACN,YAAY,CAACC,IAAI,GAAG,uBAAuB;IAC5C,CAACG,YAAY,CAACH,IAAI,GAAG,6CAA6C;IAClE,CAACI,YAAY,CAACJ,IAAI,GAAG;EACvB,CAAU;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AAC;EACDT,MAAM,CAACwB,OAAO,CAAC,CAACG,uBAAuB,CACrC,CAAC,EACD,6CAA6C,EAC7CjB,YACF,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import fs from "fs";
|
|
18
|
-
import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";
|
|
19
|
-
import * as codeWorkspacesMode from "../codeWorkspacesMode.js";
|
|
20
|
-
const FOUNDRY_PROXY_URL = "foundry.proxy.url";
|
|
21
|
-
const DEV_SERVER_DOMAIN = "workspace.stack.com";
|
|
22
|
-
const DEV_SERVER_BASE_PATH = "/proxy/path";
|
|
23
|
-
const FOUNDRY_PROXY_TOKEN = "/tmp/token.txt";
|
|
24
|
-
const MOCK_TOKEN = "token-value";
|
|
25
|
-
describe("codeWorkspacesMode", () => {
|
|
26
|
-
beforeEach(() => {
|
|
27
|
-
vi.restoreAllMocks();
|
|
28
|
-
});
|
|
29
|
-
afterEach(() => {
|
|
30
|
-
vi.unstubAllEnvs();
|
|
31
|
-
});
|
|
32
|
-
describe("isCodeWorkspacesMode", () => {
|
|
33
|
-
test("returns true for 'code-workspaces' mode", () => {
|
|
34
|
-
expect(codeWorkspacesMode.isCodeWorkspacesMode("code-workspaces")).toBe(true);
|
|
35
|
-
});
|
|
36
|
-
test("returns false for other modes", () => {
|
|
37
|
-
expect(codeWorkspacesMode.isCodeWorkspacesMode("dev")).toBe(false);
|
|
38
|
-
expect(codeWorkspacesMode.isCodeWorkspacesMode(undefined)).toBe(false);
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
describe("getCodeWorkspacesFoundryUrl", () => {
|
|
42
|
-
test("returns correct URL when env is set", () => {
|
|
43
|
-
vi.stubEnv("FOUNDRY_PROXY_URL", FOUNDRY_PROXY_URL);
|
|
44
|
-
expect(codeWorkspacesMode.getCodeWorkspacesFoundryUrl()).toBe(`https://${FOUNDRY_PROXY_URL}`);
|
|
45
|
-
});
|
|
46
|
-
test("throws if env is missing", () => {
|
|
47
|
-
vi.stubEnv("FOUNDRY_PROXY_URL", undefined);
|
|
48
|
-
expect(() => codeWorkspacesMode.getCodeWorkspacesFoundryUrl()).toThrow();
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
describe("getCodeWorkspacesBaseHref", () => {
|
|
52
|
-
test("returns correct base href when env is set", () => {
|
|
53
|
-
vi.stubEnv("DEV_SERVER_DOMAIN", DEV_SERVER_DOMAIN);
|
|
54
|
-
vi.stubEnv("DEV_SERVER_BASE_PATH", DEV_SERVER_BASE_PATH);
|
|
55
|
-
expect(codeWorkspacesMode.getCodeWorkspacesBaseHref()).toBe(`https://${DEV_SERVER_DOMAIN}${DEV_SERVER_BASE_PATH}`);
|
|
56
|
-
});
|
|
57
|
-
test("throws if DEV_SERVER_DOMAIN is missing", () => {
|
|
58
|
-
vi.stubEnv("DEV_SERVER_DOMAIN", undefined);
|
|
59
|
-
vi.stubEnv("DEV_SERVER_BASE_PATH", DEV_SERVER_BASE_PATH);
|
|
60
|
-
expect(() => codeWorkspacesMode.getCodeWorkspacesBaseHref()).toThrow();
|
|
61
|
-
});
|
|
62
|
-
test("throws if DEV_SERVER_BASE_PATH is missing", () => {
|
|
63
|
-
vi.stubEnv("DEV_SERVER_DOMAIN", DEV_SERVER_DOMAIN);
|
|
64
|
-
vi.stubEnv("DEV_SERVER_BASE_PATH", undefined);
|
|
65
|
-
expect(() => codeWorkspacesMode.getCodeWorkspacesBaseHref()).toThrow();
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
describe("getCodeWorkspacesFoundryToken", () => {
|
|
69
|
-
test("returns token from file when env and file are set", () => {
|
|
70
|
-
vi.stubEnv("FOUNDRY_PROXY_TOKEN", FOUNDRY_PROXY_TOKEN);
|
|
71
|
-
vi.spyOn(fs, "readFileSync").mockReturnValue(MOCK_TOKEN);
|
|
72
|
-
expect(codeWorkspacesMode.getCodeWorkspacesFoundryToken()).toBe(MOCK_TOKEN);
|
|
73
|
-
});
|
|
74
|
-
test("throws if env is missing", () => {
|
|
75
|
-
vi.stubEnv("FOUNDRY_PROXY_TOKEN", undefined);
|
|
76
|
-
expect(() => codeWorkspacesMode.getCodeWorkspacesFoundryToken()).toThrow();
|
|
77
|
-
});
|
|
78
|
-
test("throws if file read fails", () => {
|
|
79
|
-
vi.stubEnv("FOUNDRY_PROXY_TOKEN", FOUNDRY_PROXY_TOKEN);
|
|
80
|
-
vi.spyOn(fs, "readFileSync").mockImplementation(() => {
|
|
81
|
-
throw new Error("fail");
|
|
82
|
-
});
|
|
83
|
-
expect(() => codeWorkspacesMode.getCodeWorkspacesFoundryToken()).toThrow();
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
//# sourceMappingURL=codeWorkspacesMode.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codeWorkspacesMode.test.js","names":["fs","afterEach","beforeEach","describe","expect","test","vi","codeWorkspacesMode","FOUNDRY_PROXY_URL","DEV_SERVER_DOMAIN","DEV_SERVER_BASE_PATH","FOUNDRY_PROXY_TOKEN","MOCK_TOKEN","restoreAllMocks","unstubAllEnvs","isCodeWorkspacesMode","toBe","undefined","stubEnv","getCodeWorkspacesFoundryUrl","toThrow","getCodeWorkspacesBaseHref","spyOn","mockReturnValue","getCodeWorkspacesFoundryToken","mockImplementation","Error"],"sources":["codeWorkspacesMode.test.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport fs from \"fs\";\nimport { afterEach, beforeEach, describe, expect, test, vi } from \"vitest\";\nimport * as codeWorkspacesMode from \"../codeWorkspacesMode.js\";\n\nconst FOUNDRY_PROXY_URL = \"foundry.proxy.url\";\nconst DEV_SERVER_DOMAIN = \"workspace.stack.com\";\nconst DEV_SERVER_BASE_PATH = \"/proxy/path\";\nconst FOUNDRY_PROXY_TOKEN = \"/tmp/token.txt\";\nconst MOCK_TOKEN = \"token-value\";\n\ndescribe(\"codeWorkspacesMode\", () => {\n beforeEach(() => {\n vi.restoreAllMocks();\n });\n\n afterEach(() => {\n vi.unstubAllEnvs();\n });\n\n describe(\"isCodeWorkspacesMode\", () => {\n test(\"returns true for 'code-workspaces' mode\", () => {\n expect(codeWorkspacesMode.isCodeWorkspacesMode(\"code-workspaces\")).toBe(\n true,\n );\n });\n\n test(\"returns false for other modes\", () => {\n expect(codeWorkspacesMode.isCodeWorkspacesMode(\"dev\")).toBe(false);\n expect(codeWorkspacesMode.isCodeWorkspacesMode(undefined)).toBe(false);\n });\n });\n\n describe(\"getCodeWorkspacesFoundryUrl\", () => {\n test(\"returns correct URL when env is set\", () => {\n vi.stubEnv(\"FOUNDRY_PROXY_URL\", FOUNDRY_PROXY_URL);\n expect(codeWorkspacesMode.getCodeWorkspacesFoundryUrl()).toBe(\n `https://${FOUNDRY_PROXY_URL}`,\n );\n });\n\n test(\"throws if env is missing\", () => {\n vi.stubEnv(\"FOUNDRY_PROXY_URL\", undefined);\n expect(() => codeWorkspacesMode.getCodeWorkspacesFoundryUrl()).toThrow();\n });\n });\n\n describe(\"getCodeWorkspacesBaseHref\", () => {\n test(\"returns correct base href when env is set\", () => {\n vi.stubEnv(\"DEV_SERVER_DOMAIN\", DEV_SERVER_DOMAIN);\n vi.stubEnv(\"DEV_SERVER_BASE_PATH\", DEV_SERVER_BASE_PATH);\n expect(codeWorkspacesMode.getCodeWorkspacesBaseHref()).toBe(\n `https://${DEV_SERVER_DOMAIN}${DEV_SERVER_BASE_PATH}`,\n );\n });\n\n test(\"throws if DEV_SERVER_DOMAIN is missing\", () => {\n vi.stubEnv(\"DEV_SERVER_DOMAIN\", undefined);\n vi.stubEnv(\"DEV_SERVER_BASE_PATH\", DEV_SERVER_BASE_PATH);\n expect(() => codeWorkspacesMode.getCodeWorkspacesBaseHref()).toThrow();\n });\n\n test(\"throws if DEV_SERVER_BASE_PATH is missing\", () => {\n vi.stubEnv(\"DEV_SERVER_DOMAIN\", DEV_SERVER_DOMAIN);\n vi.stubEnv(\"DEV_SERVER_BASE_PATH\", undefined);\n expect(() => codeWorkspacesMode.getCodeWorkspacesBaseHref()).toThrow();\n });\n });\n\n describe(\"getCodeWorkspacesFoundryToken\", () => {\n test(\"returns token from file when env and file are set\", () => {\n vi.stubEnv(\"FOUNDRY_PROXY_TOKEN\", FOUNDRY_PROXY_TOKEN);\n vi.spyOn(fs, \"readFileSync\").mockReturnValue(MOCK_TOKEN);\n expect(codeWorkspacesMode.getCodeWorkspacesFoundryToken()).toBe(\n MOCK_TOKEN,\n );\n });\n\n test(\"throws if env is missing\", () => {\n vi.stubEnv(\"FOUNDRY_PROXY_TOKEN\", undefined);\n expect(() => codeWorkspacesMode.getCodeWorkspacesFoundryToken())\n .toThrow();\n });\n\n test(\"throws if file read fails\", () => {\n vi.stubEnv(\"FOUNDRY_PROXY_TOKEN\", FOUNDRY_PROXY_TOKEN);\n vi.spyOn(fs, \"readFileSync\").mockImplementation(() => {\n throw new Error(\"fail\");\n });\n expect(() => codeWorkspacesMode.getCodeWorkspacesFoundryToken())\n .toThrow();\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,EAAE,MAAM,IAAI;AACnB,SAASC,SAAS,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,IAAI,EAAEC,EAAE,QAAQ,QAAQ;AAC1E,OAAO,KAAKC,kBAAkB,MAAM,0BAA0B;AAE9D,MAAMC,iBAAiB,GAAG,mBAAmB;AAC7C,MAAMC,iBAAiB,GAAG,qBAAqB;AAC/C,MAAMC,oBAAoB,GAAG,aAAa;AAC1C,MAAMC,mBAAmB,GAAG,gBAAgB;AAC5C,MAAMC,UAAU,GAAG,aAAa;AAEhCT,QAAQ,CAAC,oBAAoB,EAAE,MAAM;EACnCD,UAAU,CAAC,MAAM;IACfI,EAAE,CAACO,eAAe,CAAC,CAAC;EACtB,CAAC,CAAC;EAEFZ,SAAS,CAAC,MAAM;IACdK,EAAE,CAACQ,aAAa,CAAC,CAAC;EACpB,CAAC,CAAC;EAEFX,QAAQ,CAAC,sBAAsB,EAAE,MAAM;IACrCE,IAAI,CAAC,yCAAyC,EAAE,MAAM;MACpDD,MAAM,CAACG,kBAAkB,CAACQ,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,CAACC,IAAI,CACrE,IACF,CAAC;IACH,CAAC,CAAC;IAEFX,IAAI,CAAC,+BAA+B,EAAE,MAAM;MAC1CD,MAAM,CAACG,kBAAkB,CAACQ,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAACC,IAAI,CAAC,KAAK,CAAC;MAClEZ,MAAM,CAACG,kBAAkB,CAACQ,oBAAoB,CAACE,SAAS,CAAC,CAAC,CAACD,IAAI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
2
|
-
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import { expect, test } from "vitest";
|
|
18
|
-
import { extractInjectedScripts } from "../extractInjectedScripts.js";
|
|
19
|
-
const EXAMPLE_SCRIPTS = `
|
|
20
|
-
<script src="/src-script.js"></script>
|
|
21
|
-
<script>
|
|
22
|
-
console.log("Hello, world!");
|
|
23
|
-
</script>
|
|
24
|
-
`;
|
|
25
|
-
test("extractInjectedScripts", async () => {
|
|
26
|
-
const result = await extractInjectedScripts({
|
|
27
|
-
transformIndexHtml: () => Promise.resolve(EXAMPLE_SCRIPTS)
|
|
28
|
-
});
|
|
29
|
-
expect(result).toEqual({
|
|
30
|
-
scriptSources: ["/src-script.js"],
|
|
31
|
-
inlineScripts: ["console.log(\"Hello, world!\");"]
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
//# sourceMappingURL=extractInjectedScripts.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extractInjectedScripts.test.js","names":["expect","test","extractInjectedScripts","EXAMPLE_SCRIPTS","result","transformIndexHtml","Promise","resolve","toEqual","scriptSources","inlineScripts"],"sources":["extractInjectedScripts.test.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { expect, test } from \"vitest\";\nimport { extractInjectedScripts } from \"../extractInjectedScripts.js\";\n\nconst EXAMPLE_SCRIPTS = `\n<script src=\"/src-script.js\"></script>\n<script>\nconsole.log(\"Hello, world!\");\n</script>\n`;\n\ntest(\"extractInjectedScripts\", async () => {\n const server = {\n transformIndexHtml: () => Promise.resolve(EXAMPLE_SCRIPTS),\n };\n\n const result = await extractInjectedScripts(server);\n expect(result).toEqual({\n scriptSources: [\"/src-script.js\"],\n inlineScripts: [\"console.log(\\\"Hello, world!\\\");\"],\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,EAAEC,IAAI,QAAQ,QAAQ;AACrC,SAASC,sBAAsB,QAAQ,8BAA8B;AAErE,MAAMC,eAAe,GAAG;AACxB;AACA;AACA;AACA;AACA,CAAC;AAEDF,IAAI,CAAC,wBAAwB,EAAE,YAAY;EAKzC,MAAMG,MAAM,GAAG,MAAMF,sBAAsB,CAJ5B;IACbG,kBAAkB,EAAEA,CAAA,KAAMC,OAAO,CAACC,OAAO,CAACJ,eAAe;EAC3D,CAEkD,CAAC;EACnDH,MAAM,CAACI,MAAM,CAAC,CAACI,OAAO,CAAC;IACrBC,aAAa,EAAE,CAAC,gBAAgB,CAAC;IACjCC,aAAa,EAAE,CAAC,iCAAiC;EACnD,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import { beforeEach, describe, expect, test, vi } from "vitest";
|
|
18
|
-
import * as codeWorkspacesMode from "../codeWorkspacesMode.js";
|
|
19
|
-
import { getBaseHref } from "../getBaseHref.js";
|
|
20
|
-
describe("getBaseHref", () => {
|
|
21
|
-
beforeEach(() => {
|
|
22
|
-
vi.restoreAllMocks();
|
|
23
|
-
});
|
|
24
|
-
test("returns localhost URLs in local mode", () => {
|
|
25
|
-
const result = getBaseHref({
|
|
26
|
-
config: {
|
|
27
|
-
mode: "",
|
|
28
|
-
base: "/",
|
|
29
|
-
server: {
|
|
30
|
-
https: false,
|
|
31
|
-
port: 5173
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
expect(result).toEqual("http://localhost:5173/");
|
|
36
|
-
});
|
|
37
|
-
test("returns code workspaces URLs in code workspaces mode", () => {
|
|
38
|
-
// Representative value when running dev mode in Code Workspaces mode
|
|
39
|
-
vi.spyOn(codeWorkspacesMode, "getCodeWorkspacesBaseHref").mockReturnValue("https://workspace.stack.com/proxy/path");
|
|
40
|
-
const result = getBaseHref({
|
|
41
|
-
config: {
|
|
42
|
-
mode: "code-workspaces"
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
expect(result).toEqual("https://workspace.stack.com/proxy/path/");
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
//# sourceMappingURL=getBaseHref.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getBaseHref.test.js","names":["beforeEach","describe","expect","test","vi","codeWorkspacesMode","getBaseHref","restoreAllMocks","result","config","mode","base","server","https","port","toEqual","spyOn","mockReturnValue"],"sources":["getBaseHref.test.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ViteDevServer } from \"vite\";\nimport { beforeEach, describe, expect, test, vi } from \"vitest\";\nimport * as codeWorkspacesMode from \"../codeWorkspacesMode.js\";\nimport { getBaseHref } from \"../getBaseHref.js\";\n\ndescribe(\"getBaseHref\", () => {\n beforeEach(() => {\n vi.restoreAllMocks();\n });\n\n test(\"returns localhost URLs in local mode\", () => {\n const server = {\n config: {\n mode: \"\",\n base: \"/\",\n server: { https: false, port: 5173 },\n },\n } as unknown as ViteDevServer;\n\n const result = getBaseHref(server);\n expect(result).toEqual(\"http://localhost:5173/\");\n });\n\n test(\"returns code workspaces URLs in code workspaces mode\", () => {\n // Representative value when running dev mode in Code Workspaces mode\n vi.spyOn(codeWorkspacesMode, \"getCodeWorkspacesBaseHref\").mockReturnValue(\n \"https://workspace.stack.com/proxy/path\",\n );\n\n const server = {\n config: { mode: \"code-workspaces\" },\n } as unknown as ViteDevServer;\n\n const result = getBaseHref(server);\n expect(result).toEqual(\"https://workspace.stack.com/proxy/path/\");\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,UAAU,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,IAAI,EAAEC,EAAE,QAAQ,QAAQ;AAC/D,OAAO,KAAKC,kBAAkB,MAAM,0BAA0B;AAC9D,SAASC,WAAW,QAAQ,mBAAmB;AAE/CL,QAAQ,CAAC,aAAa,EAAE,MAAM;EAC5BD,UAAU,CAAC,MAAM;IACfI,EAAE,CAACG,eAAe,CAAC,CAAC;EACtB,CAAC,CAAC;EAEFJ,IAAI,CAAC,sCAAsC,EAAE,MAAM;IASjD,MAAMK,MAAM,GAAGF,WAAW,CARX;MACbG,MAAM,EAAE;QACNC,IAAI,EAAE,EAAE;QACRC,IAAI,EAAE,GAAG;QACTC,MAAM,EAAE;UAAEC,KAAK,EAAE,KAAK;UAAEC,IAAI,EAAE;QAAK;MACrC;IACF,CAEiC,CAAC;IAClCZ,MAAM,CAACM,MAAM,CAAC,CAACO,OAAO,CAAC,wBAAwB,CAAC;EAClD,CAAC,CAAC;EAEFZ,IAAI,CAAC,sDAAsD,EAAE,MAAM;IACjE;IACAC,EAAE,CAACY,KAAK,CAACX,kBAAkB,EAAE,2BAA2B,CAAC,CAACY,eAAe,CACvE,wCACF,CAAC;IAMD,MAAMT,MAAM,GAAGF,WAAW,CAJX;MACbG,MAAM,EAAE;QAAEC,IAAI,EAAE;MAAkB;IACpC,CAEiC,CAAC;IAClCR,MAAM,CAACM,MAAM,CAAC,CAACO,OAAO,CAAC,yCAAyC,CAAC;EACnE,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import { beforeEach, describe, expect, test, vi } from "vitest";
|
|
18
|
-
import * as extractInjectedScriptsModule from "../extractInjectedScripts.js";
|
|
19
|
-
import { getWidgetIdOverrideMap } from "../getWidgetIdOverrideMap.js";
|
|
20
|
-
const MOCK_WIDGET_CONFIG = {
|
|
21
|
-
id: "widgetId",
|
|
22
|
-
name: "Widget Name",
|
|
23
|
-
type: "workshop",
|
|
24
|
-
parameters: {},
|
|
25
|
-
events: {}
|
|
26
|
-
};
|
|
27
|
-
const MOCK_SERVER = {
|
|
28
|
-
ssrLoadModule: vi.fn().mockResolvedValue({
|
|
29
|
-
default: MOCK_WIDGET_CONFIG
|
|
30
|
-
})
|
|
31
|
-
};
|
|
32
|
-
const MOCK_CODE_ENTRYPOINTS = {
|
|
33
|
-
"entry.ts": `/entry.js`
|
|
34
|
-
};
|
|
35
|
-
const MOCK_CONFIG_FILE_TO_ENTRYPOINT = {
|
|
36
|
-
"widget.config.ts": "entry.ts"
|
|
37
|
-
};
|
|
38
|
-
describe("getWidgetIdOverrideMap", () => {
|
|
39
|
-
beforeEach(() => {
|
|
40
|
-
vi.restoreAllMocks();
|
|
41
|
-
vi.mocked(MOCK_SERVER.ssrLoadModule).mockResolvedValue({
|
|
42
|
-
default: MOCK_WIDGET_CONFIG
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
test("localhost dev server URLs", async () => {
|
|
46
|
-
vi.spyOn(extractInjectedScriptsModule, "extractInjectedScripts").mockResolvedValue({
|
|
47
|
-
// Extracted scripts sources start with the base path
|
|
48
|
-
scriptSources: ["/@vite/client"],
|
|
49
|
-
inlineScripts: []
|
|
50
|
-
});
|
|
51
|
-
const baseHref = `http://localhost:5173/`;
|
|
52
|
-
const result = await getWidgetIdOverrideMap(MOCK_SERVER, MOCK_CODE_ENTRYPOINTS, MOCK_CONFIG_FILE_TO_ENTRYPOINT, baseHref);
|
|
53
|
-
expect(result).toEqual({
|
|
54
|
-
"widgetId": [`${baseHref}.palantir/vite-injections.js`, `${baseHref}@vite/client`, `${baseHref}entry.js`]
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
test("remote server URLs", async () => {
|
|
58
|
-
// Representative values when running dev mode in Code Workspaces mode
|
|
59
|
-
vi.spyOn(extractInjectedScriptsModule, "extractInjectedScripts").mockResolvedValue({
|
|
60
|
-
// Extracted scripts sources start with the base path
|
|
61
|
-
scriptSources: [`/proxy/path/@vite/client`],
|
|
62
|
-
inlineScripts: []
|
|
63
|
-
});
|
|
64
|
-
const baseHref = `https://worksapce.stack.com/proxy/path/`;
|
|
65
|
-
const result = await getWidgetIdOverrideMap(MOCK_SERVER, MOCK_CODE_ENTRYPOINTS, MOCK_CONFIG_FILE_TO_ENTRYPOINT, baseHref);
|
|
66
|
-
expect(result).toEqual({
|
|
67
|
-
"widgetId": [`${baseHref}.palantir/vite-injections.js`, `${baseHref}@vite/client`, `${baseHref}entry.js`]
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
//# sourceMappingURL=getWidgetIdOverrideMap.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getWidgetIdOverrideMap.test.js","names":["beforeEach","describe","expect","test","vi","extractInjectedScriptsModule","getWidgetIdOverrideMap","MOCK_WIDGET_CONFIG","id","name","type","parameters","events","MOCK_SERVER","ssrLoadModule","fn","mockResolvedValue","default","MOCK_CODE_ENTRYPOINTS","MOCK_CONFIG_FILE_TO_ENTRYPOINT","restoreAllMocks","mocked","spyOn","scriptSources","inlineScripts","baseHref","result","toEqual"],"sources":["getWidgetIdOverrideMap.test.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ParameterConfig, WidgetConfig } from \"@osdk/widget.api\";\nimport type { ViteDevServer } from \"vite\";\nimport { beforeEach, describe, expect, test, vi } from \"vitest\";\nimport * as extractInjectedScriptsModule from \"../extractInjectedScripts.js\";\nimport { getWidgetIdOverrideMap } from \"../getWidgetIdOverrideMap.js\";\n\nconst MOCK_WIDGET_CONFIG = {\n id: \"widgetId\",\n name: \"Widget Name\",\n type: \"workshop\",\n parameters: {},\n events: {},\n} as WidgetConfig<ParameterConfig>;\nconst MOCK_SERVER = {\n ssrLoadModule: vi.fn().mockResolvedValue({ default: MOCK_WIDGET_CONFIG }),\n} as unknown as ViteDevServer;\nconst MOCK_CODE_ENTRYPOINTS = { \"entry.ts\": `/entry.js` };\nconst MOCK_CONFIG_FILE_TO_ENTRYPOINT = { \"widget.config.ts\": \"entry.ts\" };\n\ndescribe(\"getWidgetIdOverrideMap\", () => {\n beforeEach(() => {\n vi.restoreAllMocks();\n vi.mocked(MOCK_SERVER.ssrLoadModule).mockResolvedValue({\n default: MOCK_WIDGET_CONFIG,\n });\n });\n\n test(\"localhost dev server URLs\", async () => {\n vi.spyOn(extractInjectedScriptsModule, \"extractInjectedScripts\")\n .mockResolvedValue({\n // Extracted scripts sources start with the base path\n scriptSources: [\"/@vite/client\"],\n inlineScripts: [],\n });\n const baseHref = `http://localhost:5173/`;\n\n const result = await getWidgetIdOverrideMap(\n MOCK_SERVER,\n MOCK_CODE_ENTRYPOINTS,\n MOCK_CONFIG_FILE_TO_ENTRYPOINT,\n baseHref,\n );\n\n expect(result).toEqual({\n \"widgetId\": [\n `${baseHref}.palantir/vite-injections.js`,\n `${baseHref}@vite/client`,\n `${baseHref}entry.js`,\n ],\n });\n });\n\n test(\"remote server URLs\", async () => {\n // Representative values when running dev mode in Code Workspaces mode\n vi.spyOn(extractInjectedScriptsModule, \"extractInjectedScripts\")\n .mockResolvedValue({\n // Extracted scripts sources start with the base path\n scriptSources: [`/proxy/path/@vite/client`],\n inlineScripts: [],\n });\n const baseHref = `https://worksapce.stack.com/proxy/path/`;\n\n const result = await getWidgetIdOverrideMap(\n MOCK_SERVER,\n MOCK_CODE_ENTRYPOINTS,\n MOCK_CONFIG_FILE_TO_ENTRYPOINT,\n baseHref,\n );\n\n expect(result).toEqual({\n \"widgetId\": [\n `${baseHref}.palantir/vite-injections.js`,\n `${baseHref}@vite/client`,\n `${baseHref}entry.js`,\n ],\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,UAAU,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,IAAI,EAAEC,EAAE,QAAQ,QAAQ;AAC/D,OAAO,KAAKC,4BAA4B,MAAM,8BAA8B;AAC5E,SAASC,sBAAsB,QAAQ,8BAA8B;AAErE,MAAMC,kBAAkB,GAAG;EACzBC,EAAE,EAAE,UAAU;EACdC,IAAI,EAAE,aAAa;EACnBC,IAAI,EAAE,UAAU;EAChBC,UAAU,EAAE,CAAC,CAAC;EACdC,MAAM,EAAE,CAAC;AACX,CAAkC;AAClC,MAAMC,WAAW,GAAG;EAClBC,aAAa,EAAEV,EAAE,CAACW,EAAE,CAAC,CAAC,CAACC,iBAAiB,CAAC;IAAEC,OAAO,EAAEV;EAAmB,CAAC;AAC1E,CAA6B;AAC7B,MAAMW,qBAAqB,GAAG;EAAE,UAAU,EAAE;AAAY,CAAC;AACzD,MAAMC,8BAA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U,EAAE,CACV,GAAGF,QAAQ,8BAA8B,EACzC,GAAGA,QAAQ,cAAc,EACzB,GAAGA,QAAQ,UAAU;IAEzB,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";
|
|
18
|
-
import * as validateDevEnvironment from "../validateDevEnvironment.js";
|
|
19
|
-
function createMockLogger() {
|
|
20
|
-
return {
|
|
21
|
-
info: vi.fn(),
|
|
22
|
-
warn: vi.fn(),
|
|
23
|
-
warnOnce: vi.fn(),
|
|
24
|
-
error: vi.fn(),
|
|
25
|
-
clearScreen: vi.fn(),
|
|
26
|
-
hasErrorLogged: vi.fn(),
|
|
27
|
-
hasWarned: false
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
describe("validateDevEnvironment", () => {
|
|
31
|
-
beforeEach(() => {
|
|
32
|
-
vi.restoreAllMocks();
|
|
33
|
-
});
|
|
34
|
-
afterEach(() => {
|
|
35
|
-
vi.unstubAllEnvs();
|
|
36
|
-
});
|
|
37
|
-
describe("warnIfWrongDevCommand", () => {
|
|
38
|
-
test("warns when in Code Workspaces env but not using code-workspaces mode", () => {
|
|
39
|
-
vi.stubEnv("FOUNDRY_CONTAINER_RUNTIME_TYPE", "CODE_WORKSPACE");
|
|
40
|
-
const mockLogger = createMockLogger();
|
|
41
|
-
validateDevEnvironment.warnIfWrongDevCommand("development", mockLogger);
|
|
42
|
-
expect(mockLogger.warn).toHaveBeenCalledTimes(1);
|
|
43
|
-
expect(mockLogger.warn).toHaveBeenCalledWith(expect.stringContaining(`You should probably be using "npm run dev:remote" instead`));
|
|
44
|
-
});
|
|
45
|
-
test("warns when using code-workspaces mode but not in Code Workspaces env", () => {
|
|
46
|
-
vi.stubEnv("FOUNDRY_CONTAINER_RUNTIME_TYPE", undefined);
|
|
47
|
-
const mockLogger = createMockLogger();
|
|
48
|
-
validateDevEnvironment.warnIfWrongDevCommand("code-workspaces", mockLogger);
|
|
49
|
-
expect(mockLogger.warn).toHaveBeenCalledTimes(1);
|
|
50
|
-
expect(mockLogger.warn).toHaveBeenCalledWith(expect.stringContaining(`You should probably be using "npm run dev" instead`));
|
|
51
|
-
});
|
|
52
|
-
test("does not warn when in Code Workspaces env and using code-workspaces mode", () => {
|
|
53
|
-
vi.stubEnv("FOUNDRY_CONTAINER_RUNTIME_TYPE", "CODE_WORKSPACE");
|
|
54
|
-
const mockLogger = createMockLogger();
|
|
55
|
-
validateDevEnvironment.warnIfWrongDevCommand("code-workspaces", mockLogger);
|
|
56
|
-
expect(mockLogger.warn).not.toHaveBeenCalled();
|
|
57
|
-
});
|
|
58
|
-
test("does not warn when not in Code Workspaces env and not using code-workspaces mode", () => {
|
|
59
|
-
vi.stubEnv("FOUNDRY_CONTAINER_RUNTIME_TYPE", undefined);
|
|
60
|
-
const mockLogger = createMockLogger();
|
|
61
|
-
validateDevEnvironment.warnIfWrongDevCommand("development", mockLogger);
|
|
62
|
-
expect(mockLogger.warn).not.toHaveBeenCalled();
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
//# sourceMappingURL=validateDevEnvironment.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validateDevEnvironment.test.js","names":["afterEach","beforeEach","describe","expect","test","vi","validateDevEnvironment","createMockLogger","info","fn","warn","warnOnce","error","clearScreen","hasErrorLogged","hasWarned","restoreAllMocks","unstubAllEnvs","stubEnv","mockLogger","warnIfWrongDevCommand","toHaveBeenCalledTimes","toHaveBeenCalledWith","stringContaining","undefined","not","toHaveBeenCalled"],"sources":["validateDevEnvironment.test.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Logger } from \"vite\";\nimport { afterEach, beforeEach, describe, expect, test, vi } from \"vitest\";\nimport * as validateDevEnvironment from \"../validateDevEnvironment.js\";\n\nfunction createMockLogger(): Logger {\n return {\n info: vi.fn(),\n warn: vi.fn(),\n warnOnce: vi.fn(),\n error: vi.fn(),\n clearScreen: vi.fn(),\n hasErrorLogged: vi.fn(),\n hasWarned: false,\n };\n}\n\ndescribe(\"validateDevEnvironment\", () => {\n beforeEach(() => {\n vi.restoreAllMocks();\n });\n\n afterEach(() => {\n vi.unstubAllEnvs();\n });\n\n describe(\"warnIfWrongDevCommand\", () => {\n test(\"warns when in Code Workspaces env but not using code-workspaces mode\", () => {\n vi.stubEnv(\"FOUNDRY_CONTAINER_RUNTIME_TYPE\", \"CODE_WORKSPACE\");\n const mockLogger = createMockLogger();\n\n validateDevEnvironment.warnIfWrongDevCommand(\"development\", mockLogger);\n\n expect(mockLogger.warn).toHaveBeenCalledTimes(1);\n expect(mockLogger.warn).toHaveBeenCalledWith(\n expect.stringContaining(\n `You should probably be using \"npm run dev:remote\" instead`,\n ),\n );\n });\n\n test(\"warns when using code-workspaces mode but not in Code Workspaces env\", () => {\n vi.stubEnv(\"FOUNDRY_CONTAINER_RUNTIME_TYPE\", undefined);\n const mockLogger = createMockLogger();\n\n validateDevEnvironment.warnIfWrongDevCommand(\n \"code-workspaces\",\n mockLogger,\n );\n\n expect(mockLogger.warn).toHaveBeenCalledTimes(1);\n expect(mockLogger.warn).toHaveBeenCalledWith(\n expect.stringContaining(\n `You should probably be using \"npm run dev\" instead`,\n ),\n );\n });\n\n test(\"does not warn when in Code Workspaces env and using code-workspaces mode\", () => {\n vi.stubEnv(\"FOUNDRY_CONTAINER_RUNTIME_TYPE\", \"CODE_WORKSPACE\");\n const mockLogger = createMockLogger();\n\n validateDevEnvironment.warnIfWrongDevCommand(\n \"code-workspaces\",\n mockLogger,\n );\n\n expect(mockLogger.warn).not.toHaveBeenCalled();\n });\n\n test(\"does not warn when not in Code Workspaces env and not using code-workspaces mode\", () => {\n vi.stubEnv(\"FOUNDRY_CONTAINER_RUNTIME_TYPE\", undefined);\n const mockLogger = createMockLogger();\n\n validateDevEnvironment.warnIfWrongDevCommand(\"development\", mockLogger);\n\n expect(mockLogger.warn).not.toHaveBeenCalled();\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,SAAS,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,IAAI,EAAEC,EAAE,QAAQ,QAAQ;AAC1E,OAAO,KAAKC,sBAAsB,MAAM,8BAA8B;AAEtE,SAASC,gBAAgBA,CAAA,EAAW;EAClC,OAAO;IACLC,IAAI,EAAEH,EAAE,CAACI,EAAE,CAAC,CAAC;IACbC,IAAI,EAAEL,EAAE,CAACI,EAAE,CAAC,CAAC;IACbE,QAAQ,EAAEN,EAAE,CAACI,EAAE,CAAC,CAAC;IAC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