sasat 0.14.2 → 0.14.3
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.
|
@@ -4,6 +4,6 @@ export class ImportDeclaration {
|
|
|
4
4
|
this.module = module;
|
|
5
5
|
}
|
|
6
6
|
toString() {
|
|
7
|
-
return `import {${this.types.join(',')}} from "${this.module}";`;
|
|
7
|
+
return `import {${this.types.join(',')}} from "${this.module.startsWith('.') ? this.module + '.js' : this.module}";`;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
const contextFile = `\
|
|
2
|
-
import { BaseGqlContext } from './__generated__/context';
|
|
2
|
+
import { BaseGqlContext } from './__generated__/context.js';
|
|
3
3
|
export interface GqlContext extends BaseGqlContext {}
|
|
4
4
|
`;
|
|
5
5
|
const pubsubFile = `\
|
|
6
|
-
import { PubSub } from "
|
|
7
|
-
import { PubSubEngine } from "graphql-subscriptions";
|
|
6
|
+
import { PubSub, PubSubEngine } from "graphql-subscriptions";
|
|
8
7
|
|
|
9
8
|
export const pubsub: PubSubEngine = new PubSub();
|
|
10
9
|
`;
|
|
11
10
|
const schemaFile = `\
|
|
12
11
|
import { assignDeep, createTypeDef } from "sasat";
|
|
13
|
-
import { typeDef } from "./__generated__/typeDefs";
|
|
14
|
-
import { resolvers } from "./__generated__/resolver";
|
|
12
|
+
import { typeDef } from "./__generated__/typeDefs.js";
|
|
13
|
+
import { resolvers } from "./__generated__/resolver.js";
|
|
15
14
|
|
|
16
15
|
export const schema = {
|
|
17
16
|
typeDefs: createTypeDef(assignDeep(typeDef, {})),
|
|
@@ -19,8 +18,8 @@ export const schema = {
|
|
|
19
18
|
};
|
|
20
19
|
`;
|
|
21
20
|
const baseDBDataSourceFile = `\
|
|
22
|
-
import { Fields, SasatRepository } from '
|
|
23
|
-
import { dataStoreInfo } from './__generated__/relationMap';
|
|
21
|
+
import { Fields, SasatRepository } from 'sasat';
|
|
22
|
+
import { dataStoreInfo } from './__generated__/relationMap.js';
|
|
24
23
|
|
|
25
24
|
|
|
26
25
|
export abstract class BaseDBDataSource<Entity, Creatable, Identifiable, EntityFields extends Fields> extends SasatRepository<
|