@ttsc/unplugin 0.31.5 → 0.31.6
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/lib/core/transform/tracker/createProjectMutationTracker.d.cts +6 -4
- package/lib/core/transform/tracker/createProjectMutationTracker.d.mts +6 -4
- package/lib/core/transform/tracker/createProjectMutationTracker.d.ts +6 -4
- package/lib/core/transform/tracker/createProjectMutationTracker.js +29 -6
- package/lib/core/transform/tracker/createProjectMutationTracker.js.map +1 -1
- package/lib/core/transform/tracker/createProjectMutationTracker.mjs +29 -6
- package/lib/core/transform/tracker/createProjectMutationTracker.mjs.map +1 -1
- package/package.json +3 -3
- package/src/core/transform/tracker/createProjectMutationTracker.ts +34 -6
|
@@ -19,10 +19,12 @@ import type { TtscProjectMutationTracker } from "./TtscProjectMutationTracker.cj
|
|
|
19
19
|
* directory excluded in both lexical and native spellings. Unknown, missing and
|
|
20
20
|
* linked ancestry remains conservative. Membership rejection withdraws
|
|
21
21
|
* notification authority except below such a proven excluded directory, so a
|
|
22
|
-
* recursive backend's writes to a cache or output tree cost no proof
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
22
|
+
* recursive backend's writes to a cache or output tree cost no proof, nor does
|
|
23
|
+
* an edit to an existing unlinked file whose every name the program cannot
|
|
24
|
+
* admit (samchon/ttsc#1737). Named events also compare current native identity
|
|
25
|
+
* and case policy with the retained identity transaction. Retargeting withdraws
|
|
26
|
+
* notification authority without changing the meaning of earlier recorded event
|
|
27
|
+
* spellings.
|
|
26
28
|
*
|
|
27
29
|
* @evidence contracts/common.md#principled-implementation
|
|
28
30
|
* The project walk and membership policy own structural relevance; content
|
|
@@ -19,10 +19,12 @@ import type { TtscProjectMutationTracker } from "./TtscProjectMutationTracker.mj
|
|
|
19
19
|
* directory excluded in both lexical and native spellings. Unknown, missing and
|
|
20
20
|
* linked ancestry remains conservative. Membership rejection withdraws
|
|
21
21
|
* notification authority except below such a proven excluded directory, so a
|
|
22
|
-
* recursive backend's writes to a cache or output tree cost no proof
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
22
|
+
* recursive backend's writes to a cache or output tree cost no proof, nor does
|
|
23
|
+
* an edit to an existing unlinked file whose every name the program cannot
|
|
24
|
+
* admit (samchon/ttsc#1737). Named events also compare current native identity
|
|
25
|
+
* and case policy with the retained identity transaction. Retargeting withdraws
|
|
26
|
+
* notification authority without changing the meaning of earlier recorded event
|
|
27
|
+
* spellings.
|
|
26
28
|
*
|
|
27
29
|
* @evidence contracts/common.md#principled-implementation
|
|
28
30
|
* The project walk and membership policy own structural relevance; content
|
|
@@ -19,10 +19,12 @@ import type { TtscProjectMutationTracker } from "./TtscProjectMutationTracker";
|
|
|
19
19
|
* directory excluded in both lexical and native spellings. Unknown, missing and
|
|
20
20
|
* linked ancestry remains conservative. Membership rejection withdraws
|
|
21
21
|
* notification authority except below such a proven excluded directory, so a
|
|
22
|
-
* recursive backend's writes to a cache or output tree cost no proof
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
22
|
+
* recursive backend's writes to a cache or output tree cost no proof, nor does
|
|
23
|
+
* an edit to an existing unlinked file whose every name the program cannot
|
|
24
|
+
* admit (samchon/ttsc#1737). Named events also compare current native identity
|
|
25
|
+
* and case policy with the retained identity transaction. Retargeting withdraws
|
|
26
|
+
* notification authority without changing the meaning of earlier recorded event
|
|
27
|
+
* spellings.
|
|
26
28
|
*
|
|
27
29
|
* @evidence contracts/common.md#principled-implementation
|
|
28
30
|
* The project walk and membership policy own structural relevance; content
|
|
@@ -35,10 +35,12 @@ var watchLocationIdentity = require('./watchLocationIdentity.js');
|
|
|
35
35
|
* directory excluded in both lexical and native spellings. Unknown, missing and
|
|
36
36
|
* linked ancestry remains conservative. Membership rejection withdraws
|
|
37
37
|
* notification authority except below such a proven excluded directory, so a
|
|
38
|
-
* recursive backend's writes to a cache or output tree cost no proof
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
38
|
+
* recursive backend's writes to a cache or output tree cost no proof, nor does
|
|
39
|
+
* an edit to an existing unlinked file whose every name the program cannot
|
|
40
|
+
* admit (samchon/ttsc#1737). Named events also compare current native identity
|
|
41
|
+
* and case policy with the retained identity transaction. Retargeting withdraws
|
|
42
|
+
* notification authority without changing the meaning of earlier recorded event
|
|
43
|
+
* spellings.
|
|
42
44
|
*
|
|
43
45
|
* @evidence contracts/common.md#principled-implementation
|
|
44
46
|
* The project walk and membership policy own structural relevance; content
|
|
@@ -173,6 +175,23 @@ async function createProjectMutationTracker(directories, covered, filesystem = D
|
|
|
173
175
|
}
|
|
174
176
|
return excluded;
|
|
175
177
|
};
|
|
178
|
+
// Whether an event names an existing file no spelling can make a program
|
|
179
|
+
// member: a regular file with no second hard link, whose own and physical
|
|
180
|
+
// names are both names the program cannot admit. A directory alias can move
|
|
181
|
+
// a file into the program but cannot rename it, and a removed name, a link
|
|
182
|
+
// or a directory stays conservative.
|
|
183
|
+
const existingNonProgramFile = (changed) => {
|
|
184
|
+
try {
|
|
185
|
+
const stats = filesystem.lstat(changed);
|
|
186
|
+
if (!stats.isFile() || stats.nlink > 1n)
|
|
187
|
+
return false;
|
|
188
|
+
return (!isPossibleProgramFileName.isPossibleProgramFileName(paths.basename(changed), policy) &&
|
|
189
|
+
!isPossibleProgramFileName.isPossibleProgramFileName(paths.basename(filesystem.realpath(changed)), policy));
|
|
190
|
+
}
|
|
191
|
+
catch {
|
|
192
|
+
return false;
|
|
193
|
+
}
|
|
194
|
+
};
|
|
176
195
|
const reportsMembership = (location, filename) => {
|
|
177
196
|
const changed = paths.join(location, filename);
|
|
178
197
|
const current = createHostPathIdentityContext.createHostPathIdentityContext(filesystem);
|
|
@@ -192,8 +211,12 @@ async function createProjectMutationTracker(directories, covered, filesystem = D
|
|
|
192
211
|
// except below a directory the walk provably excludes. A recursive backend
|
|
193
212
|
// (macOS, Windows) hears every write under the root, a cache or an output
|
|
194
213
|
// directory among them, and withdrawing authority for each sent every later
|
|
195
|
-
// delivery to the whole-snapshot proof.
|
|
196
|
-
|
|
214
|
+
// delivery to the whole-snapshot proof. An existing file whose every name
|
|
215
|
+
// the program cannot admit is no member either, a stylesheet or an asset
|
|
216
|
+
// edited in a source directory among them, on every backend.
|
|
217
|
+
if (!membership &&
|
|
218
|
+
!excludedFromWalk(changed, true) &&
|
|
219
|
+
!existingNonProgramFile(changed))
|
|
197
220
|
tracker.unverified = true;
|
|
198
221
|
return membership;
|
|
199
222
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createProjectMutationTracker.js","sources":["../../../../src/core/transform/tracker/createProjectMutationTracker.ts"],"sourcesContent":[null],"names":["DEFAULT_FILESYSTEM_OPERATIONS","PERMISSIVE_PROJECT_MEMBERSHIP_POLICY","createHostPathIdentityContext","watchLocationIdentity","isProjectWalkDirectory","
|
|
1
|
+
{"version":3,"file":"createProjectMutationTracker.js","sources":["../../../../src/core/transform/tracker/createProjectMutationTracker.ts"],"sourcesContent":[null],"names":["DEFAULT_FILESYSTEM_OPERATIONS","PERMISSIVE_PROJECT_MEMBERSHIP_POLICY","createHostPathIdentityContext","watchLocationIdentity","isProjectWalkDirectory","isPossibleProgramFileName","pathIdentityKey","reportsProgramMembership","usesWatchBroker","registerBrokeredMutationTracker","closeDirectoryWatches","openDirectoryWatch","recordProjectMutation","recordProjectChange","settleOpenedDirectoryWatches","pathIsWithin"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwEG;AACI,eAAe,4BAA4B,CAChD,WAAoD,EACpD,OAA4B,EAC5B,UAAA,GAAgDA,2DAA6B,EAC7E,SAAuCC,yEAAoC,EAAA;AAE3E,IAAA,MAAM,KAAK,GACT,CAAC,UAAU,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,MAAM;UAC1C,IAAI,CAAC;A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OAAO,EAAE,QAAQ,EAAE,UAAU,CAAC;AACjE,IAAA,OAAO,OAAO;AAChB;AAEA;AACA,SAAS,mBAAmB,CAC1B,WAA8B,EAC9B,QAAA,GAA4B,OAAO,CAAC,QAAQ,EAAA;AAE5C,IAAA,MAAM,KAAK,GAAG,QAAQ,KAAK,OAAO,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK;AAC5D,IAAA,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;AAAE,QAAA,OAAO,SAAS;IAC9C,IAAI,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAE,CAAC;IACzC,KAAK,MAAM,SAAS,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;QAC5C,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;QACzC,OAAO,CAACC,yBAAY,CAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE;YAC9C,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;YAClC,IAAI,MAAM,KAAK,IAAI;AAAE,gBAAA,OAAO,SAAS;YACrC,IAAI,GAAG,MAAM;QACf;IACF;AACA,IAAA,OAAO,IAAI;AACb;;;;"}
|
|
@@ -33,10 +33,12 @@ import { watchLocationIdentity } from './watchLocationIdentity.mjs';
|
|
|
33
33
|
* directory excluded in both lexical and native spellings. Unknown, missing and
|
|
34
34
|
* linked ancestry remains conservative. Membership rejection withdraws
|
|
35
35
|
* notification authority except below such a proven excluded directory, so a
|
|
36
|
-
* recursive backend's writes to a cache or output tree cost no proof
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
36
|
+
* recursive backend's writes to a cache or output tree cost no proof, nor does
|
|
37
|
+
* an edit to an existing unlinked file whose every name the program cannot
|
|
38
|
+
* admit (samchon/ttsc#1737). Named events also compare current native identity
|
|
39
|
+
* and case policy with the retained identity transaction. Retargeting withdraws
|
|
40
|
+
* notification authority without changing the meaning of earlier recorded event
|
|
41
|
+
* spellings.
|
|
40
42
|
*
|
|
41
43
|
* @evidence contracts/common.md#principled-implementation
|
|
42
44
|
* The project walk and membership policy own structural relevance; content
|
|
@@ -171,6 +173,23 @@ async function createProjectMutationTracker(directories, covered, filesystem = D
|
|
|
171
173
|
}
|
|
172
174
|
return excluded;
|
|
173
175
|
};
|
|
176
|
+
// Whether an event names an existing file no spelling can make a program
|
|
177
|
+
// member: a regular file with no second hard link, whose own and physical
|
|
178
|
+
// names are both names the program cannot admit. A directory alias can move
|
|
179
|
+
// a file into the program but cannot rename it, and a removed name, a link
|
|
180
|
+
// or a directory stays conservative.
|
|
181
|
+
const existingNonProgramFile = (changed) => {
|
|
182
|
+
try {
|
|
183
|
+
const stats = filesystem.lstat(changed);
|
|
184
|
+
if (!stats.isFile() || stats.nlink > 1n)
|
|
185
|
+
return false;
|
|
186
|
+
return (!isPossibleProgramFileName(paths.basename(changed), policy) &&
|
|
187
|
+
!isPossibleProgramFileName(paths.basename(filesystem.realpath(changed)), policy));
|
|
188
|
+
}
|
|
189
|
+
catch {
|
|
190
|
+
return false;
|
|
191
|
+
}
|
|
192
|
+
};
|
|
174
193
|
const reportsMembership = (location, filename) => {
|
|
175
194
|
const changed = paths.join(location, filename);
|
|
176
195
|
const current = createHostPathIdentityContext(filesystem);
|
|
@@ -190,8 +209,12 @@ async function createProjectMutationTracker(directories, covered, filesystem = D
|
|
|
190
209
|
// except below a directory the walk provably excludes. A recursive backend
|
|
191
210
|
// (macOS, Windows) hears every write under the root, a cache or an output
|
|
192
211
|
// directory among them, and withdrawing authority for each sent every later
|
|
193
|
-
// delivery to the whole-snapshot proof.
|
|
194
|
-
|
|
212
|
+
// delivery to the whole-snapshot proof. An existing file whose every name
|
|
213
|
+
// the program cannot admit is no member either, a stylesheet or an asset
|
|
214
|
+
// edited in a source directory among them, on every backend.
|
|
215
|
+
if (!membership &&
|
|
216
|
+
!excludedFromWalk(changed, true) &&
|
|
217
|
+
!existingNonProgramFile(changed))
|
|
195
218
|
tracker.unverified = true;
|
|
196
219
|
return membership;
|
|
197
220
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createProjectMutationTracker.mjs","sources":["../../../../src/core/transform/tracker/createProjectMutationTracker.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAuBA
|
|
1
|
+
{"version":3,"file":"createProjectMutationTracker.mjs","sources":["../../../../src/core/transform/tracker/createProjectMutationTracker.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAuBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwEG;AACI,eAAe,4BAA4B,CAChD,WAAoD,EACpD,OAA4B,EAC5B,UAAA,GAAgD,6BAA6B,EAC7E,SAAuC,oCAAoC,EAAA;AAE3E,IAAA,MAAM,KAAK,GACT,CAAC,UAAU,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,MAAM;UAC1C,IAAI,CAAC;AACP,UAAE,IAAI,CAAC,KAAK;AAChB,IAAA,MAAM,UAAU,GAAG,6BAA6B,CAAC,UAAU,CAAC;IAC5D,MAAM,IAAI,GAAG,mBAAmB,CAC9B,WAAW,CAAC,GAAG,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,IAAI,CAAC,EAC9C,UAAU,CAAC,QAAQ,CACpB;AACD,IAAA,MAAM,OAAO,GAA+B;QAC1C,OAAO,EAAE,IAAI,GAAG,EAAE;AAClB,QAAA,cAAc,EAAE,KAAK;QACrB,KAAK,EAAE,MAAK;AACV,YAAA,OAAO,CAAC,MAAM,GAAG,IAAI;QACvB,CAAC;;;;QAID,OAAO;AACP,QAAA,MAAM,EAAE,KAAK;AACb,QAAA,iBAAiB,EAAE,KAAK;AACxB,QAAA,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KACvB,UAAU,CAAC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Q,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE;YAC9C,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;YAClC,IAAI,MAAM,KAAK,IAAI;AAAE,gBAAA,OAAO,SAAS;YACrC,IAAI,GAAG,MAAM;QACf;IACF;AACA,IAAA,OAAO,IAAI;AACb;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttsc/unplugin",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.6",
|
|
4
4
|
"description": "Bundler adapters for ttsc plugins.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.mjs",
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
"fsevents": "^2.3.3"
|
|
203
203
|
},
|
|
204
204
|
"peerDependencies": {
|
|
205
|
-
"ttsc": "^0.31.
|
|
205
|
+
"ttsc": "^0.31.6"
|
|
206
206
|
},
|
|
207
207
|
"devDependencies": {
|
|
208
208
|
"@wrtnlabs/evidence": "^0.3.1",
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
"tslib": "^2.8.1",
|
|
218
218
|
"typescript": "^7.0.2",
|
|
219
219
|
"vite": "^7.3.5",
|
|
220
|
-
"ttsc": "0.31.
|
|
220
|
+
"ttsc": "0.31.6"
|
|
221
221
|
},
|
|
222
222
|
"repository": {
|
|
223
223
|
"type": "git",
|
|
@@ -38,10 +38,12 @@ import { watchLocationIdentity } from "./watchLocationIdentity";
|
|
|
38
38
|
* directory excluded in both lexical and native spellings. Unknown, missing and
|
|
39
39
|
* linked ancestry remains conservative. Membership rejection withdraws
|
|
40
40
|
* notification authority except below such a proven excluded directory, so a
|
|
41
|
-
* recursive backend's writes to a cache or output tree cost no proof
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
41
|
+
* recursive backend's writes to a cache or output tree cost no proof, nor does
|
|
42
|
+
* an edit to an existing unlinked file whose every name the program cannot
|
|
43
|
+
* admit (samchon/ttsc#1737). Named events also compare current native identity
|
|
44
|
+
* and case policy with the retained identity transaction. Retargeting withdraws
|
|
45
|
+
* notification authority without changing the meaning of earlier recorded event
|
|
46
|
+
* spellings.
|
|
45
47
|
*
|
|
46
48
|
* @evidence contracts/common.md#principled-implementation
|
|
47
49
|
* The project walk and membership policy own structural relevance; content
|
|
@@ -193,6 +195,26 @@ export async function createProjectMutationTracker(
|
|
|
193
195
|
}
|
|
194
196
|
return excluded;
|
|
195
197
|
};
|
|
198
|
+
// Whether an event names an existing file no spelling can make a program
|
|
199
|
+
// member: a regular file with no second hard link, whose own and physical
|
|
200
|
+
// names are both names the program cannot admit. A directory alias can move
|
|
201
|
+
// a file into the program but cannot rename it, and a removed name, a link
|
|
202
|
+
// or a directory stays conservative.
|
|
203
|
+
const existingNonProgramFile = (changed: string): boolean => {
|
|
204
|
+
try {
|
|
205
|
+
const stats = filesystem.lstat(changed);
|
|
206
|
+
if (!stats.isFile() || stats.nlink > 1n) return false;
|
|
207
|
+
return (
|
|
208
|
+
!isPossibleProgramFileName(paths.basename(changed), policy) &&
|
|
209
|
+
!isPossibleProgramFileName(
|
|
210
|
+
paths.basename(filesystem.realpath(changed)),
|
|
211
|
+
policy,
|
|
212
|
+
)
|
|
213
|
+
);
|
|
214
|
+
} catch {
|
|
215
|
+
return false;
|
|
216
|
+
}
|
|
217
|
+
};
|
|
196
218
|
const reportsMembership = (location: string, filename: string): boolean => {
|
|
197
219
|
const changed = paths.join(location, filename);
|
|
198
220
|
const current = createHostPathIdentityContext(filesystem);
|
|
@@ -221,8 +243,14 @@ export async function createProjectMutationTracker(
|
|
|
221
243
|
// except below a directory the walk provably excludes. A recursive backend
|
|
222
244
|
// (macOS, Windows) hears every write under the root, a cache or an output
|
|
223
245
|
// directory among them, and withdrawing authority for each sent every later
|
|
224
|
-
// delivery to the whole-snapshot proof.
|
|
225
|
-
|
|
246
|
+
// delivery to the whole-snapshot proof. An existing file whose every name
|
|
247
|
+
// the program cannot admit is no member either, a stylesheet or an asset
|
|
248
|
+
// edited in a source directory among them, on every backend.
|
|
249
|
+
if (
|
|
250
|
+
!membership &&
|
|
251
|
+
!excludedFromWalk(changed, true) &&
|
|
252
|
+
!existingNonProgramFile(changed)
|
|
253
|
+
)
|
|
226
254
|
tracker.unverified = true;
|
|
227
255
|
return membership;
|
|
228
256
|
};
|