sr-npm 1.0.10 → 1.7.1
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/backend/consts.js +1 -1
- package/backend/elevated-modules.js +19 -0
- package/backend/queries.js +5 -3
- package/package.json +1 -1
- package/.wix/debug.log +0 -111
package/backend/consts.js
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const { items } = require('@wix/data');
|
|
2
|
+
const { auth } = require('@wix/essentials');
|
|
3
|
+
|
|
4
|
+
// @wix/data does not support suppressAuth currently, so we need to elevate it
|
|
5
|
+
const wixData = {
|
|
6
|
+
insert: auth.elevate(items.insert),
|
|
7
|
+
update: auth.elevate(items.update),
|
|
8
|
+
bulkInsert: auth.elevate(items.bulkInsert),
|
|
9
|
+
query: auth.elevate(items.query),
|
|
10
|
+
save: auth.elevate(items.save),
|
|
11
|
+
remove: auth.elevate(items.remove),
|
|
12
|
+
get: auth.elevate(items.get),
|
|
13
|
+
//TODO: add other methods here as needed
|
|
14
|
+
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
module.exports = { wixData };
|
package/backend/queries.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
const { COLLECTIONS } = require('./consts');
|
|
2
|
-
const { items } = require('@wix/data');
|
|
2
|
+
//const { items } = require('@wix/data');
|
|
3
|
+
const { wixData } = require('./elevated-modules');
|
|
4
|
+
|
|
3
5
|
|
|
4
6
|
|
|
5
7
|
async function getAllPositions() {
|
|
6
|
-
const query =
|
|
8
|
+
const query = wixData.query(COLLECTIONS.JOBS);
|
|
7
9
|
const results = await query.find();
|
|
8
10
|
return results.items;
|
|
9
11
|
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
async function getPositionsByField(field, value) {
|
|
13
|
-
const query =
|
|
15
|
+
const query = wixData.query(COLLECTIONS.JOBS)
|
|
14
16
|
.eq(field, value);
|
|
15
17
|
const results = await query.find();
|
|
16
18
|
return results.items;
|
package/package.json
CHANGED
package/.wix/debug.log
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
----- CLI crash report at 2025-07-04T08:24:57.754Z
|
|
2
|
-
Error Trace
|
|
3
|
-
FailedToFetchPackageDetails: FailedToFetchPackageDetails
|
|
4
|
-
at fetchPackageDetails (/usr/local/lib/node_modules/@wix/cli-version-manager/src/package-details-reader.ts:54:11)
|
|
5
|
-
at async versionNotifier (/usr/local/lib/node_modules/@wix/cli-version-manager/src/version-notifier.tsx:8:26)
|
|
6
|
-
at async <anonymous> (/usr/local/lib/node_modules/@wix/cli/src/index.tsx:56:26)
|
|
7
|
-
caused by: FailedToWriteCache: FailedToWriteCache
|
|
8
|
-
at Object.set (/usr/local/lib/node_modules/@wix/cli-fs-cache/src/index.ts:75:13)
|
|
9
|
-
at async fetchPackageDetails (/usr/local/lib/node_modules/@wix/cli-version-manager/src/package-details-reader.ts:49:7)
|
|
10
|
-
at async versionNotifier (/usr/local/lib/node_modules/@wix/cli-version-manager/src/version-notifier.tsx:8:26)
|
|
11
|
-
at async <anonymous> (/usr/local/lib/node_modules/@wix/cli/src/index.tsx:56:26)
|
|
12
|
-
caused by: FailedToWriteJson: FailedToWriteJson
|
|
13
|
-
at writeJson (/usr/local/lib/node_modules/@wix/cli-fs/src/index.ts:29:11)
|
|
14
|
-
at async Object.set (/usr/local/lib/node_modules/@wix/cli-fs-cache/src/index.ts:69:7)
|
|
15
|
-
at async fetchPackageDetails (/usr/local/lib/node_modules/@wix/cli-version-manager/src/package-details-reader.ts:49:7)
|
|
16
|
-
at async versionNotifier (/usr/local/lib/node_modules/@wix/cli-version-manager/src/version-notifier.tsx:8:26)
|
|
17
|
-
at async <anonymous> (/usr/local/lib/node_modules/@wix/cli/src/index.tsx:56:26)
|
|
18
|
-
caused by: Error: EACCES: permission denied, open '/usr/local/lib/node_modules/@wix/cli/version.cache.json'
|
|
19
|
-
at async open (node:internal/fs/promises:633:25)
|
|
20
|
-
at async writeFile (node:internal/fs/promises:1207:14)
|
|
21
|
-
at async writeJson (/usr/local/lib/node_modules/@wix/cli-fs/src/index.ts:27:5)
|
|
22
|
-
at async Object.set (/usr/local/lib/node_modules/@wix/cli-fs-cache/src/index.ts:69:7)
|
|
23
|
-
at async fetchPackageDetails (/usr/local/lib/node_modules/@wix/cli-version-manager/src/package-details-reader.ts:49:7)
|
|
24
|
-
at async versionNotifier (/usr/local/lib/node_modules/@wix/cli-version-manager/src/version-notifier.tsx:8:26)
|
|
25
|
-
at async <anonymous> (/usr/local/lib/node_modules/@wix/cli/src/index.tsx:56:26)
|
|
26
|
-
Error Info
|
|
27
|
-
{}
|
|
28
|
-
----- CLI crash report at 2025-07-04T08:24:57.801Z
|
|
29
|
-
Error Trace
|
|
30
|
-
FailedToIdentifyProgramFlow: FailedToIdentifyProgramFlow
|
|
31
|
-
at _Command.<anonymous> (/usr/local/lib/node_modules/@wix/cli/src/program.ts:72:15)
|
|
32
|
-
at _Command.emit (node:events:518:28)
|
|
33
|
-
at _Command._parseCommand (/usr/local/lib/node_modules/node_modules/commander/lib/command.js:1607:14)
|
|
34
|
-
at _Command.parseAsync (/usr/local/lib/node_modules/node_modules/commander/lib/command.js:1104:16)
|
|
35
|
-
at <anonymous> (/usr/local/lib/node_modules/@wix/cli/src/index.tsx:80:39)
|
|
36
|
-
Error Info
|
|
37
|
-
{}
|
|
38
|
-
----- CLI crash report at 2025-07-04T08:24:59.930Z
|
|
39
|
-
Error Trace
|
|
40
|
-
FailedToFetchPackageDetails: FailedToFetchPackageDetails
|
|
41
|
-
at fetchPackageDetails (/usr/local/lib/node_modules/@wix/cli-version-manager/src/package-details-reader.ts:54:11)
|
|
42
|
-
at async versionNotifier (/usr/local/lib/node_modules/@wix/cli-version-manager/src/version-notifier.tsx:8:26)
|
|
43
|
-
at async <anonymous> (/usr/local/lib/node_modules/@wix/cli/src/index.tsx:56:26)
|
|
44
|
-
caused by: FailedToWriteCache: FailedToWriteCache
|
|
45
|
-
at Object.set (/usr/local/lib/node_modules/@wix/cli-fs-cache/src/index.ts:75:13)
|
|
46
|
-
at async fetchPackageDetails (/usr/local/lib/node_modules/@wix/cli-version-manager/src/package-details-reader.ts:49:7)
|
|
47
|
-
at async versionNotifier (/usr/local/lib/node_modules/@wix/cli-version-manager/src/version-notifier.tsx:8:26)
|
|
48
|
-
at async <anonymous> (/usr/local/lib/node_modules/@wix/cli/src/index.tsx:56:26)
|
|
49
|
-
caused by: FailedToWriteJson: FailedToWriteJson
|
|
50
|
-
at writeJson (/usr/local/lib/node_modules/@wix/cli-fs/src/index.ts:29:11)
|
|
51
|
-
at async Object.set (/usr/local/lib/node_modules/@wix/cli-fs-cache/src/index.ts:69:7)
|
|
52
|
-
at async fetchPackageDetails (/usr/local/lib/node_modules/@wix/cli-version-manager/src/package-details-reader.ts:49:7)
|
|
53
|
-
at async versionNotifier (/usr/local/lib/node_modules/@wix/cli-version-manager/src/version-notifier.tsx:8:26)
|
|
54
|
-
at async <anonymous> (/usr/local/lib/node_modules/@wix/cli/src/index.tsx:56:26)
|
|
55
|
-
caused by: Error: EACCES: permission denied, open '/usr/local/lib/node_modules/@wix/cli/version.cache.json'
|
|
56
|
-
at async open (node:internal/fs/promises:633:25)
|
|
57
|
-
at async writeFile (node:internal/fs/promises:1207:14)
|
|
58
|
-
at async writeJson (/usr/local/lib/node_modules/@wix/cli-fs/src/index.ts:27:5)
|
|
59
|
-
at async Object.set (/usr/local/lib/node_modules/@wix/cli-fs-cache/src/index.ts:69:7)
|
|
60
|
-
at async fetchPackageDetails (/usr/local/lib/node_modules/@wix/cli-version-manager/src/package-details-reader.ts:49:7)
|
|
61
|
-
at async versionNotifier (/usr/local/lib/node_modules/@wix/cli-version-manager/src/version-notifier.tsx:8:26)
|
|
62
|
-
at async <anonymous> (/usr/local/lib/node_modules/@wix/cli/src/index.tsx:56:26)
|
|
63
|
-
Error Info
|
|
64
|
-
{}
|
|
65
|
-
----- CLI crash report at 2025-07-04T08:24:59.969Z
|
|
66
|
-
Error Trace
|
|
67
|
-
FailedToIdentifyProgramFlow: FailedToIdentifyProgramFlow
|
|
68
|
-
at _Command.<anonymous> (/usr/local/lib/node_modules/@wix/cli/src/program.ts:72:15)
|
|
69
|
-
at _Command.emit (node:events:518:28)
|
|
70
|
-
at _Command._parseCommand (/usr/local/lib/node_modules/node_modules/commander/lib/command.js:1607:14)
|
|
71
|
-
at _Command.parseAsync (/usr/local/lib/node_modules/node_modules/commander/lib/command.js:1104:16)
|
|
72
|
-
at <anonymous> (/usr/local/lib/node_modules/@wix/cli/src/index.tsx:80:39)
|
|
73
|
-
Error Info
|
|
74
|
-
{}
|
|
75
|
-
----- CLI crash report at 2025-07-04T08:43:49.027Z
|
|
76
|
-
Error Trace
|
|
77
|
-
FailedToFetchPackageDetails: FailedToFetchPackageDetails
|
|
78
|
-
at fetchPackageDetails (/usr/local/lib/node_modules/@wix/cli-version-manager/src/package-details-reader.ts:54:11)
|
|
79
|
-
at async versionNotifier (/usr/local/lib/node_modules/@wix/cli-version-manager/src/version-notifier.tsx:8:26)
|
|
80
|
-
at async <anonymous> (/usr/local/lib/node_modules/@wix/cli/src/index.tsx:56:26)
|
|
81
|
-
caused by: FailedToWriteCache: FailedToWriteCache
|
|
82
|
-
at Object.set (/usr/local/lib/node_modules/@wix/cli-fs-cache/src/index.ts:75:13)
|
|
83
|
-
at async fetchPackageDetails (/usr/local/lib/node_modules/@wix/cli-version-manager/src/package-details-reader.ts:49:7)
|
|
84
|
-
at async versionNotifier (/usr/local/lib/node_modules/@wix/cli-version-manager/src/version-notifier.tsx:8:26)
|
|
85
|
-
at async <anonymous> (/usr/local/lib/node_modules/@wix/cli/src/index.tsx:56:26)
|
|
86
|
-
caused by: FailedToWriteJson: FailedToWriteJson
|
|
87
|
-
at writeJson (/usr/local/lib/node_modules/@wix/cli-fs/src/index.ts:29:11)
|
|
88
|
-
at async Object.set (/usr/local/lib/node_modules/@wix/cli-fs-cache/src/index.ts:69:7)
|
|
89
|
-
at async fetchPackageDetails (/usr/local/lib/node_modules/@wix/cli-version-manager/src/package-details-reader.ts:49:7)
|
|
90
|
-
at async versionNotifier (/usr/local/lib/node_modules/@wix/cli-version-manager/src/version-notifier.tsx:8:26)
|
|
91
|
-
at async <anonymous> (/usr/local/lib/node_modules/@wix/cli/src/index.tsx:56:26)
|
|
92
|
-
caused by: Error: EACCES: permission denied, open '/usr/local/lib/node_modules/@wix/cli/version.cache.json'
|
|
93
|
-
at async open (node:internal/fs/promises:633:25)
|
|
94
|
-
at async writeFile (node:internal/fs/promises:1207:14)
|
|
95
|
-
at async writeJson (/usr/local/lib/node_modules/@wix/cli-fs/src/index.ts:27:5)
|
|
96
|
-
at async Object.set (/usr/local/lib/node_modules/@wix/cli-fs-cache/src/index.ts:69:7)
|
|
97
|
-
at async fetchPackageDetails (/usr/local/lib/node_modules/@wix/cli-version-manager/src/package-details-reader.ts:49:7)
|
|
98
|
-
at async versionNotifier (/usr/local/lib/node_modules/@wix/cli-version-manager/src/version-notifier.tsx:8:26)
|
|
99
|
-
at async <anonymous> (/usr/local/lib/node_modules/@wix/cli/src/index.tsx:56:26)
|
|
100
|
-
Error Info
|
|
101
|
-
{}
|
|
102
|
-
----- CLI crash report at 2025-07-04T08:43:49.081Z
|
|
103
|
-
Error Trace
|
|
104
|
-
FailedToIdentifyProgramFlow: FailedToIdentifyProgramFlow
|
|
105
|
-
at _Command.<anonymous> (/usr/local/lib/node_modules/@wix/cli/src/program.ts:72:15)
|
|
106
|
-
at _Command.emit (node:events:518:28)
|
|
107
|
-
at _Command._parseCommand (/usr/local/lib/node_modules/node_modules/commander/lib/command.js:1607:14)
|
|
108
|
-
at _Command.parseAsync (/usr/local/lib/node_modules/node_modules/commander/lib/command.js:1104:16)
|
|
109
|
-
at <anonymous> (/usr/local/lib/node_modules/@wix/cli/src/index.tsx:80:39)
|
|
110
|
-
Error Info
|
|
111
|
-
{}
|