rebuildjs 0.5.1 → 0.6.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/browser/index.d.ts +1 -1
- package/browser/index.js +6 -6
- package/browser/index.test.ts +9 -3
- package/package.json +1 -1
- package/server/index.js +6 -6
- package/server/index.test.ts +9 -2
package/browser/index.d.ts
CHANGED
package/browser/index.js
CHANGED
|
@@ -13,12 +13,12 @@ export const [
|
|
|
13
13
|
] = be_sig_triple_(()=>
|
|
14
14
|
undefined,
|
|
15
15
|
async (ctx, browser__metafile$)=>{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
if (!browser__metafile$.lock) {
|
|
17
|
+
let metafile_path
|
|
18
|
+
browser__metafile$._ =
|
|
19
|
+
await file_exists_(metafile_path = join(browser_path_(ctx), 'metafile.json'))
|
|
20
|
+
? JSON.parse(await readFile(metafile_path).then(buf=>buf.toString()))
|
|
21
|
+
: null
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
{ ...app_ctx__be_config, id: 'browser__metafile' })
|
package/browser/index.test.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
import { rmemo__wait } from 'ctx-core/all'
|
|
1
2
|
import { test } from 'uvu'
|
|
2
3
|
import { equal } from 'uvu/assert'
|
|
3
|
-
import '
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import { app_ctx } from '../ctx/index.js'
|
|
5
|
+
import { browser__metafile$_ } from './index.js'
|
|
6
|
+
test('server__metafile', async ()=>{
|
|
7
|
+
equal(browser__metafile$_(app_ctx)._, undefined)
|
|
8
|
+
const val = await rmemo__wait(
|
|
9
|
+
browser__metafile$_(app_ctx),
|
|
10
|
+
val=>val !== undefined)
|
|
11
|
+
equal(val, null)
|
|
6
12
|
})
|
|
7
13
|
test.run()
|
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -12,12 +12,12 @@ export const [
|
|
|
12
12
|
] = be_lock_memosig_triple_(()=>
|
|
13
13
|
undefined,
|
|
14
14
|
async (ctx, server__metafile$)=>{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
if (!server__metafile$.lock) {
|
|
16
|
+
let metafile_path
|
|
17
|
+
server__metafile$._ =
|
|
18
|
+
await file_exists_(metafile_path = join(server_path_(ctx), 'metafile.json'))
|
|
19
|
+
? JSON.parse(await readFile(metafile_path).then(buf=>buf.toString()))
|
|
20
|
+
: null
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
{ ...middleware_ctx__be_config, id: 'server__metafile' })
|
package/server/index.test.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
import { rmemo__wait } from 'ctx-core/rmemo'
|
|
1
2
|
import { test } from 'uvu'
|
|
2
3
|
import { equal } from 'uvu/assert'
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
import { app_ctx } from '../ctx/index.js'
|
|
5
|
+
import { server__metafile$_ } from './index.js'
|
|
6
|
+
test('server__metafile', async ()=>{
|
|
7
|
+
equal(server__metafile$_(app_ctx)._, undefined)
|
|
8
|
+
const val = await rmemo__wait(
|
|
9
|
+
server__metafile$_(app_ctx),
|
|
10
|
+
val=>val !== undefined)
|
|
11
|
+
equal(val, null)
|
|
5
12
|
})
|
|
6
13
|
test.run()
|