Skip to content

Commit 84a2dcc

Browse files
authored
feat: User Roles and permissions management (#36)
1 parent 211ec65 commit 84a2dcc

File tree

126 files changed

+8998
-5480
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+8998
-5480
lines changed

cli/src/run-manager.ts

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -198,19 +198,33 @@ export class RunManager {
198198
Deno.exit(0);
199199
}
200200
async setupWatcher() {
201-
const dirs = Deno.readDirSync(this.rootPath);
202-
const paths = [];
203-
for (const item of dirs) {
204-
if (item.isDirectory && item.name != ".inspatial") {
205-
paths.push(joinPath(this.rootPath, item.name));
206-
}
207-
if (item.name.endsWith(".type.ts")) {
208-
continue;
209-
}
210-
if (item.isFile && item.name.endsWith("ts")) {
211-
paths.push(joinPath(this.rootPath, item.name));
201+
const paths: string[] = [];
202+
const setupPaths = (
203+
root: string,
204+
dirs: IteratorObject<Deno.DirEntry, unknown, unknown>,
205+
) => {
206+
for (const item of dirs) {
207+
if (item.isDirectory && !item.name.startsWith(".")) {
208+
paths.push(joinPath(root, item.name));
209+
}
210+
if (item.name.endsWith(".type.ts")) {
211+
continue;
212+
}
213+
if (item.isFile && item.name.endsWith("ts")) {
214+
paths.push(joinPath(root, item.name));
215+
}
212216
}
217+
};
218+
const dirs = Deno.readDirSync(this.rootPath);
219+
setupPaths(this.rootPath, dirs);
220+
try {
221+
const cloudPath = joinPath(this.rootPath, "..", "inspatial-cloud", "src");
222+
const cloudDirs = Deno.readDirSync(cloudPath);
223+
setupPaths(cloudPath, cloudDirs);
224+
} catch (_e) {
225+
// No inspatial-cloud directory, skip it
213226
}
227+
214228
const watcher = Deno.watchFs(paths, {
215229
recursive: true,
216230
});

deno.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "@inspatial/cloud",
3-
"version": "0.6.20",
3+
"version": "0.7.0",
44
"license": "Apache-2.0",
55
"exports": {
66
".": "./mod.ts",
7-
"./extensions": "./extensions/mod.ts",
87
"./utils": "./src/utils/mod.ts",
98
"./types": "./types.ts",
10-
"./incloud": "./cli/incloud.ts"
9+
"./incloud": "./cli/incloud.ts",
10+
"./models": "./src/types/models.ts"
1111
},
1212

1313
"publish": {
@@ -30,10 +30,13 @@
3030
"@inspatial/cloud-client": "jsr:@inspatial/cloud-client@^0.1.22",
3131
"~/": "./src/",
3232
"#cli/": "./cli/src/",
33-
"#extensions/": "./extensions/",
3433
"#types/": "./src/types/",
3534
"#inLog": "./src/in-log/in-log.ts"
3635
},
36+
"compilerOptions": {
37+
"types": ["./types.ts", "./src/types/models.ts"],
38+
"verbatimModuleSyntax": true
39+
},
3740
"tasks": {
3841
"check": "deno publish --dry-run",
3942
"type-check": "deno check --all mod.ts",

0 commit comments

Comments
 (0)