Deno plugins (#42)

Switch from BoaJS to Deno core
This commit is contained in:
Gregory Schier authored and GitHub committed 2024-06-07 10:47:41 -07:00
1 parent f43b38c893
commit acfc254a58
32 files changed
+1378 -5663

No files matched your search

+5 -1
View File
@@ -13,7 +13,11 @@ interface ExportResources {
folders: AtLeast<Folder, 'name' | 'id' | 'model' | 'workspaceId'>[];
}
export function pluginHookImport(contents: string): { resources: ExportResources } | undefined {
export function pluginHookImport(
ctx: any,
contents: string,
): { resources: ExportResources } | undefined {
console.log('CTX', ctx);
const root = parseJSONToRecord(contents);
if (root == null) return;
+1 -1
View File
@@ -23,7 +23,7 @@ describe('importer-postman', () => {
for (const fixture of fixtures) {
test('Imports ' + fixture, () => {
const contents = fs.readFileSync(path.join(p, fixture), 'utf-8');
const imported = pluginHookImport(contents);
const imported = pluginHookImport({}, contents);
const folder0 = newId('folder');
const folder1 = newId('folder');
expect(imported).toEqual({
+3 -1
View File
@@ -8,6 +8,8 @@ export default defineConfig({
fileName: 'index',
formats: ['es'],
},
outDir: resolve(__dirname, '../../src-tauri/plugins/importer-postman'),
emptyOutDir: true,
sourcemap: true,
outDir: resolve(__dirname, 'build'),
},
});