dsh-openwrite 0.2.33 → 0.2.34
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/docs/CONTEXT_SLOTS.md +1 -1
- package/package.json +1 -1
- package/packages/studio-panel/lib/client.js +518 -518
- package/release/runtime-manifest.json +1 -1
- package/release/source.json +3 -3
- package/scripts/prepare.mjs +15 -2
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"core": {
|
|
68
68
|
"repository": "https://github.com/LiPu-jpg/Openwrite",
|
|
69
69
|
"branch": "native-core",
|
|
70
|
-
"commit": "
|
|
70
|
+
"commit": "82bae73fd2e1cab88dc05f36cc3945c2d6ee6756"
|
|
71
71
|
},
|
|
72
72
|
"cryptography": {
|
|
73
73
|
"package": "cryptography",
|
package/release/source.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"repository": "https://github.com/LiPu-jpg/Openwrite",
|
|
3
|
-
"commit": "
|
|
4
|
-
"tree": "
|
|
3
|
+
"commit": "4538026daf85cb0ce5652d8f0fc831173f5981b9",
|
|
4
|
+
"tree": "ed35517a1e41632b60e07076cf27227184163ee0",
|
|
5
5
|
"dirty": false,
|
|
6
6
|
"acquisition": "git-checkout",
|
|
7
|
-
"sourceTreeSha256": "
|
|
7
|
+
"sourceTreeSha256": "2945bc2f3de4f83878d633788d7ef2628fa0929a6b1a64beee51db5b23f79817",
|
|
8
8
|
"components": [
|
|
9
9
|
{
|
|
10
10
|
"name": "@deepseek-ai/schemastery",
|
package/scripts/prepare.mjs
CHANGED
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
// Git installs build here only after the user authorizes this package in pnpm.
|
|
2
2
|
// Precompiled Release tarballs need no install script or sibling checkout.
|
|
3
|
-
import { access, readFile } from 'node:fs/promises'
|
|
3
|
+
import { access, readFile, stat } from 'node:fs/promises'
|
|
4
4
|
import { spawnSync } from 'node:child_process'
|
|
5
5
|
import { fileURLToPath } from 'node:url'
|
|
6
6
|
const root = fileURLToPath(new URL('../', import.meta.url))
|
|
7
7
|
const manifest = JSON.parse(await readFile(new URL('../release/runtime-manifest.json', import.meta.url), 'utf8'))
|
|
8
8
|
let built = false
|
|
9
9
|
await access(new URL('../release/' + manifest.wheel.file, import.meta.url))
|
|
10
|
+
// The plugin version is baked into the client bundle as the preset identity
|
|
11
|
+
// (`openwrite-<version>`), so a package.json edited after the last build
|
|
12
|
+
// leaves the bundle naming the previous release. A build that only checks
|
|
13
|
+
// whether the outputs exist packs that stale identity, and the host then
|
|
14
|
+
// answers `preset "openwrite-<old>" not found`. Rebuild whenever the manifest
|
|
15
|
+
// is newer than the artifacts it feeds.
|
|
16
|
+
const manifestStamp = (await stat(new URL('../package.json', import.meta.url))).mtimeMs
|
|
10
17
|
for (const dir of ['packages/openwrite-bridge', 'packages/studio-panel']) {
|
|
11
|
-
|
|
18
|
+
const outputs = [
|
|
19
|
+
new URL(`../${dir}/lib/index.js`, import.meta.url),
|
|
20
|
+
new URL(`../${dir}/lib/${dir.endsWith('openwrite-bridge') ? 'preset-tools.js' : 'client.js'}`, import.meta.url),
|
|
21
|
+
]
|
|
22
|
+
let newest = 0
|
|
23
|
+
try { for (const file of outputs) newest = Math.max(newest, (await stat(file)).mtimeMs) } catch { newest = 0 }
|
|
24
|
+
if (newest !== 0 && newest >= manifestStamp) continue
|
|
12
25
|
built = true
|
|
13
26
|
for (const args of [['ci', '--ignore-scripts', '--no-audit', '--no-fund'], ['run', 'build']]) {
|
|
14
27
|
const result = spawnSync(process.platform === 'win32' ? 'npm.cmd' : 'npm', args, { cwd: root + dir, stdio: 'inherit', shell: process.platform === 'win32' })
|