silgi 0.7.21 → 0.7.22

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.
@@ -1,4 +1,4 @@
1
- const version = "0.7.21";
1
+ const version = "0.7.22";
2
2
  const packageJson = {
3
3
  version: version};
4
4
 
@@ -825,6 +825,9 @@ const commonArgs = {
825
825
  async function registerModuleExportScan(silgi) {
826
826
  silgi.hook("prepare:schema.ts", async (options) => {
827
827
  for (const module of silgi.scanModules) {
828
+ if (module.meta._packageName || silgi.options.preset === "npm-package") {
829
+ continue;
830
+ }
828
831
  const exports = module.meta.exports;
829
832
  if (!exports?.length)
830
833
  continue;
@@ -835,79 +838,77 @@ async function registerModuleExportScan(silgi) {
835
838
  from: module.meta._packageName ? moduleName : relativeWithDot(silgi.options.build.typesDir, module.entryPath)
836
839
  };
837
840
  const exportedTypes = exports.filter((exp) => exp.type).map((exp) => exp.name);
838
- if (!module.meta._packageName) {
839
- if (exportedTypes.includes("ModuleOptions")) {
840
- const importName = pascalCase(`${configKey}Config`);
841
- options.importItems[configKey].import.push({
842
- name: `ModuleOptions as ${importName}`,
843
- type: true
844
- });
845
- options.options.push({ key: configKey, value: importName });
846
- }
847
- if (exportedTypes.includes("SilgiRuntimeOptions")) {
848
- const importName = pascalCase(`${configKey}RuntimeConfig`);
849
- options.importItems[configKey].import.push({
850
- name: `SilgiRuntimeOptions as ${importName}`,
851
- type: true
852
- });
853
- options.runtimeOptions.push({ key: configKey, value: importName });
854
- }
855
- if (exportedTypes.includes("ModuleRuntimeContext")) {
856
- const importName = pascalCase(`${configKey}RuntimeContext`);
857
- options.importItems[configKey].import.push({
858
- name: `ModuleRuntimeContext as ${importName}`,
859
- type: true
860
- });
861
- options.contexts.push({ key: configKey, value: importName });
862
- }
863
- if (exportedTypes.includes("ModuleRuntimeAction")) {
864
- const importName = pascalCase(`${configKey}Action`);
865
- options.importItems[configKey].import.push({
866
- name: `ModuleRuntimeAction as ${importName}`,
867
- type: true
868
- });
869
- options.actions.push({ key: configKey, value: importName });
870
- }
871
- if (exportedTypes.includes("ModuleRuntimeShared")) {
872
- const importName = pascalCase(`${configKey}Shared`);
873
- options.importItems[configKey].import.push({
874
- name: `ModuleRuntimeShared as ${importName}`,
875
- type: true
876
- });
877
- options.shareds.push({ key: configKey, value: importName });
878
- }
879
- if (exportedTypes.includes("ModuleHooks")) {
880
- const importName = pascalCase(`${configKey}Hooks`);
881
- options.importItems[configKey].import.push({
882
- name: `ModuleHooks as ${importName}`,
883
- type: true
884
- });
885
- options.hooks.push({ key: configKey, value: importName });
886
- }
887
- if (exportedTypes.includes("ModuleRuntimeHooks")) {
888
- const importName = pascalCase(`${configKey}RuntimeHooks`);
889
- options.importItems[configKey].import.push({
890
- name: `ModuleRuntimeHooks as ${importName}`,
891
- type: true
892
- });
893
- options.runtimeHooks.push({ key: configKey, value: importName });
894
- }
895
- if (exportedTypes.includes("ModuleRuntimeOptions")) {
896
- const importName = pascalCase(`${configKey}RuntimeOptions`);
897
- options.importItems[configKey].import.push({
898
- name: `ModuleRuntimeOptions as ${importName}`,
899
- type: true
900
- });
901
- options.runtimeOptions.push({ key: configKey, value: importName });
902
- }
903
- if (exportedTypes.includes("SilgiRuntimeMethods")) {
904
- const importName = pascalCase(`${configKey}RuntimeMethods`);
905
- options.importItems[configKey].import.push({
906
- name: `SilgiRuntimeMethods as ${importName}`,
907
- type: true
908
- });
909
- options.methods.push({ key: configKey, value: importName });
910
- }
841
+ if (exportedTypes.includes("ModuleOptions")) {
842
+ const importName = pascalCase(`${configKey}Config`);
843
+ options.importItems[configKey].import.push({
844
+ name: `ModuleOptions as ${importName}`,
845
+ type: true
846
+ });
847
+ options.options.push({ key: configKey, value: importName });
848
+ }
849
+ if (exportedTypes.includes("SilgiRuntimeOptions")) {
850
+ const importName = pascalCase(`${configKey}RuntimeConfig`);
851
+ options.importItems[configKey].import.push({
852
+ name: `SilgiRuntimeOptions as ${importName}`,
853
+ type: true
854
+ });
855
+ options.runtimeOptions.push({ key: configKey, value: importName });
856
+ }
857
+ if (exportedTypes.includes("ModuleRuntimeContext")) {
858
+ const importName = pascalCase(`${configKey}RuntimeContext`);
859
+ options.importItems[configKey].import.push({
860
+ name: `ModuleRuntimeContext as ${importName}`,
861
+ type: true
862
+ });
863
+ options.contexts.push({ key: configKey, value: importName });
864
+ }
865
+ if (exportedTypes.includes("ModuleRuntimeAction")) {
866
+ const importName = pascalCase(`${configKey}Action`);
867
+ options.importItems[configKey].import.push({
868
+ name: `ModuleRuntimeAction as ${importName}`,
869
+ type: true
870
+ });
871
+ options.actions.push({ key: configKey, value: importName });
872
+ }
873
+ if (exportedTypes.includes("ModuleRuntimeShared")) {
874
+ const importName = pascalCase(`${configKey}Shared`);
875
+ options.importItems[configKey].import.push({
876
+ name: `ModuleRuntimeShared as ${importName}`,
877
+ type: true
878
+ });
879
+ options.shareds.push({ key: configKey, value: importName });
880
+ }
881
+ if (exportedTypes.includes("ModuleHooks")) {
882
+ const importName = pascalCase(`${configKey}Hooks`);
883
+ options.importItems[configKey].import.push({
884
+ name: `ModuleHooks as ${importName}`,
885
+ type: true
886
+ });
887
+ options.hooks.push({ key: configKey, value: importName });
888
+ }
889
+ if (exportedTypes.includes("ModuleRuntimeHooks")) {
890
+ const importName = pascalCase(`${configKey}RuntimeHooks`);
891
+ options.importItems[configKey].import.push({
892
+ name: `ModuleRuntimeHooks as ${importName}`,
893
+ type: true
894
+ });
895
+ options.runtimeHooks.push({ key: configKey, value: importName });
896
+ }
897
+ if (exportedTypes.includes("ModuleRuntimeOptions")) {
898
+ const importName = pascalCase(`${configKey}RuntimeOptions`);
899
+ options.importItems[configKey].import.push({
900
+ name: `ModuleRuntimeOptions as ${importName}`,
901
+ type: true
902
+ });
903
+ options.runtimeOptions.push({ key: configKey, value: importName });
904
+ }
905
+ if (exportedTypes.includes("SilgiRuntimeMethods")) {
906
+ const importName = pascalCase(`${configKey}RuntimeMethods`);
907
+ options.importItems[configKey].import.push({
908
+ name: `SilgiRuntimeMethods as ${importName}`,
909
+ type: true
910
+ });
911
+ options.methods.push({ key: configKey, value: importName });
911
912
  }
912
913
  }
913
914
  });
@@ -1,3 +1,3 @@
1
- const version = "0.7.21";
1
+ const version = "0.7.22";
2
2
 
3
3
  export { version };
@@ -1,3 +1,3 @@
1
- const version = "0.7.21";
1
+ const version = "0.7.22";
2
2
 
3
3
  export { version };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.7.21",
4
+ "version": "0.7.22",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {