@simpleplatform/sdk 1.0.1 → 1.0.2
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/build.js +3 -3
- package/dist/worker-override.js +1 -1
- package/package.json +2 -2
package/dist/build.js
CHANGED
|
@@ -21,7 +21,7 @@ async function main() {
|
|
|
21
21
|
/**
|
|
22
22
|
* This is a local esbuild plugin to solve our specific problem.
|
|
23
23
|
* It intercepts module resolution. When it sees a file inside the
|
|
24
|
-
* @
|
|
24
|
+
* @simpleplatform/sdk package trying to import the exact relative path './host',
|
|
25
25
|
* it redirects the bundler to our worker-override.js script instead.
|
|
26
26
|
* This is the robust way to swap implementations at build time.
|
|
27
27
|
*/
|
|
@@ -30,7 +30,7 @@ async function main() {
|
|
|
30
30
|
setup(build) {
|
|
31
31
|
// Find the absolute path to the SDK's dist directory.
|
|
32
32
|
// We need this to check if an import is coming from our SDK.
|
|
33
|
-
const sdkDistPath = path.dirname(require.resolve('@
|
|
33
|
+
const sdkDistPath = path.dirname(require.resolve('@simpleplatform/sdk'))
|
|
34
34
|
|
|
35
35
|
// The 'onResolve' hook intercepts module lookups.
|
|
36
36
|
build.onResolve({ filter: /^\.\/host$/ }, (args) => {
|
|
@@ -137,7 +137,7 @@ async function main() {
|
|
|
137
137
|
minify: true,
|
|
138
138
|
outfile: outFileAbs,
|
|
139
139
|
stdin: {
|
|
140
|
-
contents: `import simple from '@
|
|
140
|
+
contents: `import simple from '@simpleplatform/sdk'; simple.Handle(() => {});`,
|
|
141
141
|
// eslint-disable-next-line node/prefer-global/process
|
|
142
142
|
resolveDir: process.cwd(),
|
|
143
143
|
},
|
package/dist/worker-override.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @file SDK Worker Override Module.
|
|
3
3
|
* This file exports worker-compatible implementations of `execute` and
|
|
4
4
|
* `executeAsync`. The SDK's build tool will use esbuild's `alias` feature
|
|
5
|
-
* to replace the original `@
|
|
5
|
+
* to replace the original `@simpleplatform/sdk/host` module with this one during
|
|
6
6
|
* the async application build.
|
|
7
7
|
*/
|
|
8
8
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simpleplatform/sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Simple Platform Typescript SDK",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://docs.simple.dev",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"esbuild": "0.27.2"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@types/node": "25.0.
|
|
67
|
+
"@types/node": "25.0.5",
|
|
68
68
|
"typescript": "5.9.3"
|
|
69
69
|
},
|
|
70
70
|
"scripts": {
|