@naylence/runtime 0.3.5-test.914 → 0.3.5-test.916

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.
@@ -98,12 +98,12 @@ installProcessEnvShim();
98
98
  // --- END ENV SHIM ---
99
99
 
100
100
  // This file is auto-generated during build - do not edit manually
101
- // Generated from package.json version: 0.3.5-test.914
101
+ // Generated from package.json version: 0.3.5-test.916
102
102
  /**
103
103
  * The package version, injected at build time.
104
104
  * @internal
105
105
  */
106
- const VERSION = '0.3.5-test.914';
106
+ const VERSION = '0.3.5-test.916';
107
107
 
108
108
  /**
109
109
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -13100,6 +13100,80 @@ const currentModuleUrl = (() => {
13100
13100
  }
13101
13101
  })();
13102
13102
  let cachedNodeRequire = typeof require === 'function' ? require : null;
13103
+ function createFsShim() {
13104
+ if (!isNode) {
13105
+ return null;
13106
+ }
13107
+ const processBinding = process.binding;
13108
+ if (typeof processBinding !== 'function') {
13109
+ return null;
13110
+ }
13111
+ try {
13112
+ const fsBinding = processBinding('fs');
13113
+ if (!fsBinding || typeof fsBinding.readFileUtf8 !== 'function') {
13114
+ return null;
13115
+ }
13116
+ const shim = {
13117
+ readFileSync: (...args) => {
13118
+ const [pathOrDescriptor, options] = args;
13119
+ if (typeof pathOrDescriptor !== 'string') {
13120
+ throw new Error('FS shim only supports string file paths');
13121
+ }
13122
+ let encoding;
13123
+ if (typeof options === 'string') {
13124
+ encoding = options;
13125
+ }
13126
+ else if (options &&
13127
+ typeof options === 'object' &&
13128
+ 'encoding' in options &&
13129
+ typeof options.encoding === 'string') {
13130
+ encoding = options.encoding;
13131
+ }
13132
+ const data = fsBinding.readFileUtf8(pathOrDescriptor, 0);
13133
+ if (!encoding) {
13134
+ return typeof Buffer !== 'undefined'
13135
+ ? Buffer.from(data, 'utf-8')
13136
+ : data;
13137
+ }
13138
+ const lowered = encoding.toLowerCase();
13139
+ if (lowered === 'utf-8' || lowered === 'utf8') {
13140
+ return data;
13141
+ }
13142
+ if (typeof Buffer === 'undefined') {
13143
+ throw new Error(`Buffer API is not available to convert encoding ${String(encoding)}`);
13144
+ }
13145
+ return Buffer.from(data, 'utf-8').toString(encoding);
13146
+ },
13147
+ existsSync: (...args) => {
13148
+ const [pathLike] = args;
13149
+ if (typeof pathLike !== 'string') {
13150
+ return false;
13151
+ }
13152
+ if (typeof fsBinding.existsSync === 'function') {
13153
+ try {
13154
+ return Boolean(fsBinding.existsSync(pathLike));
13155
+ }
13156
+ catch {
13157
+ // fall through to the internal stat fallback
13158
+ }
13159
+ }
13160
+ if (typeof fsBinding.internalModuleStat === 'function') {
13161
+ try {
13162
+ return (fsBinding.internalModuleStat(pathLike) >= 0);
13163
+ }
13164
+ catch {
13165
+ return false;
13166
+ }
13167
+ }
13168
+ return false;
13169
+ },
13170
+ };
13171
+ return shim;
13172
+ }
13173
+ catch {
13174
+ return null;
13175
+ }
13176
+ }
13103
13177
  function fileUrlToPath(url) {
13104
13178
  try {
13105
13179
  const parsed = new URL(url);
@@ -13162,6 +13236,11 @@ function getFsModule() {
13162
13236
  throw new Error(`Unable to load file system module: ${error instanceof Error ? error.message : String(error)}`);
13163
13237
  }
13164
13238
  }
13239
+ const shim = createFsShim();
13240
+ if (shim) {
13241
+ cachedFsModule = shim;
13242
+ return cachedFsModule;
13243
+ }
13165
13244
  throw new Error('File system module is not accessible in this environment');
13166
13245
  }
13167
13246
  function readConfigFile(filePath) {
@@ -31908,7 +31987,8 @@ function normalizeConfig$m(config) {
31908
31987
  candidate.profileName.trim().length > 0
31909
31988
  ? candidate.profileName
31910
31989
  : PROFILE_NAME_DIRECT;
31911
- return { profile: profileValue.toLowerCase() };
31990
+ const normalizedProfile = profileValue.trim().toLowerCase();
31991
+ return { profile: normalizedProfile };
31912
31992
  }
31913
31993
  function resolveProfileConfig(profileName) {
31914
31994
  const profile = PROFILE_MAP$1[profileName];
@@ -96,12 +96,12 @@ installProcessEnvShim();
96
96
  // --- END ENV SHIM ---
97
97
 
98
98
  // This file is auto-generated during build - do not edit manually
99
- // Generated from package.json version: 0.3.5-test.914
99
+ // Generated from package.json version: 0.3.5-test.916
100
100
  /**
101
101
  * The package version, injected at build time.
102
102
  * @internal
103
103
  */
104
- const VERSION = '0.3.5-test.914';
104
+ const VERSION = '0.3.5-test.916';
105
105
 
106
106
  /**
107
107
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -13098,6 +13098,80 @@ const currentModuleUrl = (() => {
13098
13098
  }
13099
13099
  })();
13100
13100
  let cachedNodeRequire = typeof require === 'function' ? require : null;
13101
+ function createFsShim() {
13102
+ if (!isNode) {
13103
+ return null;
13104
+ }
13105
+ const processBinding = process.binding;
13106
+ if (typeof processBinding !== 'function') {
13107
+ return null;
13108
+ }
13109
+ try {
13110
+ const fsBinding = processBinding('fs');
13111
+ if (!fsBinding || typeof fsBinding.readFileUtf8 !== 'function') {
13112
+ return null;
13113
+ }
13114
+ const shim = {
13115
+ readFileSync: (...args) => {
13116
+ const [pathOrDescriptor, options] = args;
13117
+ if (typeof pathOrDescriptor !== 'string') {
13118
+ throw new Error('FS shim only supports string file paths');
13119
+ }
13120
+ let encoding;
13121
+ if (typeof options === 'string') {
13122
+ encoding = options;
13123
+ }
13124
+ else if (options &&
13125
+ typeof options === 'object' &&
13126
+ 'encoding' in options &&
13127
+ typeof options.encoding === 'string') {
13128
+ encoding = options.encoding;
13129
+ }
13130
+ const data = fsBinding.readFileUtf8(pathOrDescriptor, 0);
13131
+ if (!encoding) {
13132
+ return typeof Buffer !== 'undefined'
13133
+ ? Buffer.from(data, 'utf-8')
13134
+ : data;
13135
+ }
13136
+ const lowered = encoding.toLowerCase();
13137
+ if (lowered === 'utf-8' || lowered === 'utf8') {
13138
+ return data;
13139
+ }
13140
+ if (typeof Buffer === 'undefined') {
13141
+ throw new Error(`Buffer API is not available to convert encoding ${String(encoding)}`);
13142
+ }
13143
+ return Buffer.from(data, 'utf-8').toString(encoding);
13144
+ },
13145
+ existsSync: (...args) => {
13146
+ const [pathLike] = args;
13147
+ if (typeof pathLike !== 'string') {
13148
+ return false;
13149
+ }
13150
+ if (typeof fsBinding.existsSync === 'function') {
13151
+ try {
13152
+ return Boolean(fsBinding.existsSync(pathLike));
13153
+ }
13154
+ catch {
13155
+ // fall through to the internal stat fallback
13156
+ }
13157
+ }
13158
+ if (typeof fsBinding.internalModuleStat === 'function') {
13159
+ try {
13160
+ return (fsBinding.internalModuleStat(pathLike) >= 0);
13161
+ }
13162
+ catch {
13163
+ return false;
13164
+ }
13165
+ }
13166
+ return false;
13167
+ },
13168
+ };
13169
+ return shim;
13170
+ }
13171
+ catch {
13172
+ return null;
13173
+ }
13174
+ }
13101
13175
  function fileUrlToPath(url) {
13102
13176
  try {
13103
13177
  const parsed = new URL(url);
@@ -13160,6 +13234,11 @@ function getFsModule() {
13160
13234
  throw new Error(`Unable to load file system module: ${error instanceof Error ? error.message : String(error)}`);
13161
13235
  }
13162
13236
  }
13237
+ const shim = createFsShim();
13238
+ if (shim) {
13239
+ cachedFsModule = shim;
13240
+ return cachedFsModule;
13241
+ }
13163
13242
  throw new Error('File system module is not accessible in this environment');
13164
13243
  }
13165
13244
  function readConfigFile(filePath) {
@@ -31906,7 +31985,8 @@ function normalizeConfig$m(config) {
31906
31985
  candidate.profileName.trim().length > 0
31907
31986
  ? candidate.profileName
31908
31987
  : PROFILE_NAME_DIRECT;
31909
- return { profile: profileValue.toLowerCase() };
31988
+ const normalizedProfile = profileValue.trim().toLowerCase();
31989
+ return { profile: normalizedProfile };
31910
31990
  }
31911
31991
  function resolveProfileConfig(profileName) {
31912
31992
  const profile = PROFILE_MAP$1[profileName];
@@ -67,6 +67,80 @@ const currentModuleUrl = (() => {
67
67
  }
68
68
  })();
69
69
  let cachedNodeRequire = typeof require === 'function' ? require : null;
70
+ function createFsShim() {
71
+ if (!logging_types_js_1.isNode) {
72
+ return null;
73
+ }
74
+ const processBinding = process.binding;
75
+ if (typeof processBinding !== 'function') {
76
+ return null;
77
+ }
78
+ try {
79
+ const fsBinding = processBinding('fs');
80
+ if (!fsBinding || typeof fsBinding.readFileUtf8 !== 'function') {
81
+ return null;
82
+ }
83
+ const shim = {
84
+ readFileSync: (...args) => {
85
+ const [pathOrDescriptor, options] = args;
86
+ if (typeof pathOrDescriptor !== 'string') {
87
+ throw new Error('FS shim only supports string file paths');
88
+ }
89
+ let encoding;
90
+ if (typeof options === 'string') {
91
+ encoding = options;
92
+ }
93
+ else if (options &&
94
+ typeof options === 'object' &&
95
+ 'encoding' in options &&
96
+ typeof options.encoding === 'string') {
97
+ encoding = options.encoding;
98
+ }
99
+ const data = fsBinding.readFileUtf8(pathOrDescriptor, 0);
100
+ if (!encoding) {
101
+ return typeof Buffer !== 'undefined'
102
+ ? Buffer.from(data, 'utf-8')
103
+ : data;
104
+ }
105
+ const lowered = encoding.toLowerCase();
106
+ if (lowered === 'utf-8' || lowered === 'utf8') {
107
+ return data;
108
+ }
109
+ if (typeof Buffer === 'undefined') {
110
+ throw new Error(`Buffer API is not available to convert encoding ${String(encoding)}`);
111
+ }
112
+ return Buffer.from(data, 'utf-8').toString(encoding);
113
+ },
114
+ existsSync: (...args) => {
115
+ const [pathLike] = args;
116
+ if (typeof pathLike !== 'string') {
117
+ return false;
118
+ }
119
+ if (typeof fsBinding.existsSync === 'function') {
120
+ try {
121
+ return Boolean(fsBinding.existsSync(pathLike));
122
+ }
123
+ catch {
124
+ // fall through to the internal stat fallback
125
+ }
126
+ }
127
+ if (typeof fsBinding.internalModuleStat === 'function') {
128
+ try {
129
+ return (fsBinding.internalModuleStat(pathLike) >= 0);
130
+ }
131
+ catch {
132
+ return false;
133
+ }
134
+ }
135
+ return false;
136
+ },
137
+ };
138
+ return shim;
139
+ }
140
+ catch {
141
+ return null;
142
+ }
143
+ }
70
144
  function fileUrlToPath(url) {
71
145
  try {
72
146
  const parsed = new URL(url);
@@ -129,6 +203,11 @@ function getFsModule() {
129
203
  throw new Error(`Unable to load file system module: ${error instanceof Error ? error.message : String(error)}`);
130
204
  }
131
205
  }
206
+ const shim = createFsShim();
207
+ if (shim) {
208
+ cachedFsModule = shim;
209
+ return cachedFsModule;
210
+ }
132
211
  throw new Error('File system module is not accessible in this environment');
133
212
  }
134
213
  function readConfigFile(filePath) {
@@ -259,7 +259,8 @@ function normalizeConfig(config) {
259
259
  candidate.profileName.trim().length > 0
260
260
  ? candidate.profileName
261
261
  : PROFILE_NAME_DIRECT;
262
- return { profile: profileValue.toLowerCase() };
262
+ const normalizedProfile = profileValue.trim().toLowerCase();
263
+ return { profile: normalizedProfile };
263
264
  }
264
265
  function resolveProfileConfig(profileName) {
265
266
  const profile = PROFILE_MAP[profileName];
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  // This file is auto-generated during build - do not edit manually
3
- // Generated from package.json version: 0.3.5-test.914
3
+ // Generated from package.json version: 0.3.5-test.916
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.VERSION = void 0;
6
6
  /**
7
7
  * The package version, injected at build time.
8
8
  * @internal
9
9
  */
10
- exports.VERSION = '0.3.5-test.914';
10
+ exports.VERSION = '0.3.5-test.916';
@@ -24,6 +24,80 @@ const currentModuleUrl = (() => {
24
24
  }
25
25
  })();
26
26
  let cachedNodeRequire = typeof require === 'function' ? require : null;
27
+ function createFsShim() {
28
+ if (!isNode) {
29
+ return null;
30
+ }
31
+ const processBinding = process.binding;
32
+ if (typeof processBinding !== 'function') {
33
+ return null;
34
+ }
35
+ try {
36
+ const fsBinding = processBinding('fs');
37
+ if (!fsBinding || typeof fsBinding.readFileUtf8 !== 'function') {
38
+ return null;
39
+ }
40
+ const shim = {
41
+ readFileSync: (...args) => {
42
+ const [pathOrDescriptor, options] = args;
43
+ if (typeof pathOrDescriptor !== 'string') {
44
+ throw new Error('FS shim only supports string file paths');
45
+ }
46
+ let encoding;
47
+ if (typeof options === 'string') {
48
+ encoding = options;
49
+ }
50
+ else if (options &&
51
+ typeof options === 'object' &&
52
+ 'encoding' in options &&
53
+ typeof options.encoding === 'string') {
54
+ encoding = options.encoding;
55
+ }
56
+ const data = fsBinding.readFileUtf8(pathOrDescriptor, 0);
57
+ if (!encoding) {
58
+ return typeof Buffer !== 'undefined'
59
+ ? Buffer.from(data, 'utf-8')
60
+ : data;
61
+ }
62
+ const lowered = encoding.toLowerCase();
63
+ if (lowered === 'utf-8' || lowered === 'utf8') {
64
+ return data;
65
+ }
66
+ if (typeof Buffer === 'undefined') {
67
+ throw new Error(`Buffer API is not available to convert encoding ${String(encoding)}`);
68
+ }
69
+ return Buffer.from(data, 'utf-8').toString(encoding);
70
+ },
71
+ existsSync: (...args) => {
72
+ const [pathLike] = args;
73
+ if (typeof pathLike !== 'string') {
74
+ return false;
75
+ }
76
+ if (typeof fsBinding.existsSync === 'function') {
77
+ try {
78
+ return Boolean(fsBinding.existsSync(pathLike));
79
+ }
80
+ catch {
81
+ // fall through to the internal stat fallback
82
+ }
83
+ }
84
+ if (typeof fsBinding.internalModuleStat === 'function') {
85
+ try {
86
+ return (fsBinding.internalModuleStat(pathLike) >= 0);
87
+ }
88
+ catch {
89
+ return false;
90
+ }
91
+ }
92
+ return false;
93
+ },
94
+ };
95
+ return shim;
96
+ }
97
+ catch {
98
+ return null;
99
+ }
100
+ }
27
101
  function fileUrlToPath(url) {
28
102
  try {
29
103
  const parsed = new URL(url);
@@ -86,6 +160,11 @@ function getFsModule() {
86
160
  throw new Error(`Unable to load file system module: ${error instanceof Error ? error.message : String(error)}`);
87
161
  }
88
162
  }
163
+ const shim = createFsShim();
164
+ if (shim) {
165
+ cachedFsModule = shim;
166
+ return cachedFsModule;
167
+ }
89
168
  throw new Error('File system module is not accessible in this environment');
90
169
  }
91
170
  function readConfigFile(filePath) {
@@ -255,7 +255,8 @@ function normalizeConfig(config) {
255
255
  candidate.profileName.trim().length > 0
256
256
  ? candidate.profileName
257
257
  : PROFILE_NAME_DIRECT;
258
- return { profile: profileValue.toLowerCase() };
258
+ const normalizedProfile = profileValue.trim().toLowerCase();
259
+ return { profile: normalizedProfile };
259
260
  }
260
261
  function resolveProfileConfig(profileName) {
261
262
  const profile = PROFILE_MAP[profileName];
@@ -1,7 +1,7 @@
1
1
  // This file is auto-generated during build - do not edit manually
2
- // Generated from package.json version: 0.3.5-test.914
2
+ // Generated from package.json version: 0.3.5-test.916
3
3
  /**
4
4
  * The package version, injected at build time.
5
5
  * @internal
6
6
  */
7
- export const VERSION = '0.3.5-test.914';
7
+ export const VERSION = '0.3.5-test.916';
@@ -14,12 +14,12 @@ var websocketPlugin = require('@fastify/websocket');
14
14
  var ed25519 = require('@noble/ed25519');
15
15
 
16
16
  // This file is auto-generated during build - do not edit manually
17
- // Generated from package.json version: 0.3.5-test.914
17
+ // Generated from package.json version: 0.3.5-test.916
18
18
  /**
19
19
  * The package version, injected at build time.
20
20
  * @internal
21
21
  */
22
- const VERSION = '0.3.5-test.914';
22
+ const VERSION = '0.3.5-test.916';
23
23
 
24
24
  /**
25
25
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -13016,6 +13016,80 @@ const currentModuleUrl = (() => {
13016
13016
  }
13017
13017
  })();
13018
13018
  let cachedNodeRequire = typeof require === 'function' ? require : null;
13019
+ function createFsShim() {
13020
+ if (!isNode) {
13021
+ return null;
13022
+ }
13023
+ const processBinding = process.binding;
13024
+ if (typeof processBinding !== 'function') {
13025
+ return null;
13026
+ }
13027
+ try {
13028
+ const fsBinding = processBinding('fs');
13029
+ if (!fsBinding || typeof fsBinding.readFileUtf8 !== 'function') {
13030
+ return null;
13031
+ }
13032
+ const shim = {
13033
+ readFileSync: (...args) => {
13034
+ const [pathOrDescriptor, options] = args;
13035
+ if (typeof pathOrDescriptor !== 'string') {
13036
+ throw new Error('FS shim only supports string file paths');
13037
+ }
13038
+ let encoding;
13039
+ if (typeof options === 'string') {
13040
+ encoding = options;
13041
+ }
13042
+ else if (options &&
13043
+ typeof options === 'object' &&
13044
+ 'encoding' in options &&
13045
+ typeof options.encoding === 'string') {
13046
+ encoding = options.encoding;
13047
+ }
13048
+ const data = fsBinding.readFileUtf8(pathOrDescriptor, 0);
13049
+ if (!encoding) {
13050
+ return typeof Buffer !== 'undefined'
13051
+ ? Buffer.from(data, 'utf-8')
13052
+ : data;
13053
+ }
13054
+ const lowered = encoding.toLowerCase();
13055
+ if (lowered === 'utf-8' || lowered === 'utf8') {
13056
+ return data;
13057
+ }
13058
+ if (typeof Buffer === 'undefined') {
13059
+ throw new Error(`Buffer API is not available to convert encoding ${String(encoding)}`);
13060
+ }
13061
+ return Buffer.from(data, 'utf-8').toString(encoding);
13062
+ },
13063
+ existsSync: (...args) => {
13064
+ const [pathLike] = args;
13065
+ if (typeof pathLike !== 'string') {
13066
+ return false;
13067
+ }
13068
+ if (typeof fsBinding.existsSync === 'function') {
13069
+ try {
13070
+ return Boolean(fsBinding.existsSync(pathLike));
13071
+ }
13072
+ catch {
13073
+ // fall through to the internal stat fallback
13074
+ }
13075
+ }
13076
+ if (typeof fsBinding.internalModuleStat === 'function') {
13077
+ try {
13078
+ return (fsBinding.internalModuleStat(pathLike) >= 0);
13079
+ }
13080
+ catch {
13081
+ return false;
13082
+ }
13083
+ }
13084
+ return false;
13085
+ },
13086
+ };
13087
+ return shim;
13088
+ }
13089
+ catch {
13090
+ return null;
13091
+ }
13092
+ }
13019
13093
  function fileUrlToPath(url) {
13020
13094
  try {
13021
13095
  const parsed = new URL(url);
@@ -13078,6 +13152,11 @@ function getFsModule() {
13078
13152
  throw new Error(`Unable to load file system module: ${error instanceof Error ? error.message : String(error)}`);
13079
13153
  }
13080
13154
  }
13155
+ const shim = createFsShim();
13156
+ if (shim) {
13157
+ cachedFsModule = shim;
13158
+ return cachedFsModule;
13159
+ }
13081
13160
  throw new Error('File system module is not accessible in this environment');
13082
13161
  }
13083
13162
  function readConfigFile(filePath) {
@@ -30630,7 +30709,8 @@ function normalizeConfig$m(config) {
30630
30709
  candidate.profileName.trim().length > 0
30631
30710
  ? candidate.profileName
30632
30711
  : PROFILE_NAME_DIRECT;
30633
- return { profile: profileValue.toLowerCase() };
30712
+ const normalizedProfile = profileValue.trim().toLowerCase();
30713
+ return { profile: normalizedProfile };
30634
30714
  }
30635
30715
  function resolveProfileConfig(profileName) {
30636
30716
  const profile = PROFILE_MAP$1[profileName];
@@ -13,12 +13,12 @@ import websocketPlugin from '@fastify/websocket';
13
13
  import { sign, hashes, verify } from '@noble/ed25519';
14
14
 
15
15
  // This file is auto-generated during build - do not edit manually
16
- // Generated from package.json version: 0.3.5-test.914
16
+ // Generated from package.json version: 0.3.5-test.916
17
17
  /**
18
18
  * The package version, injected at build time.
19
19
  * @internal
20
20
  */
21
- const VERSION = '0.3.5-test.914';
21
+ const VERSION = '0.3.5-test.916';
22
22
 
23
23
  /**
24
24
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -13015,6 +13015,80 @@ const currentModuleUrl = (() => {
13015
13015
  }
13016
13016
  })();
13017
13017
  let cachedNodeRequire = typeof require === 'function' ? require : null;
13018
+ function createFsShim() {
13019
+ if (!isNode) {
13020
+ return null;
13021
+ }
13022
+ const processBinding = process.binding;
13023
+ if (typeof processBinding !== 'function') {
13024
+ return null;
13025
+ }
13026
+ try {
13027
+ const fsBinding = processBinding('fs');
13028
+ if (!fsBinding || typeof fsBinding.readFileUtf8 !== 'function') {
13029
+ return null;
13030
+ }
13031
+ const shim = {
13032
+ readFileSync: (...args) => {
13033
+ const [pathOrDescriptor, options] = args;
13034
+ if (typeof pathOrDescriptor !== 'string') {
13035
+ throw new Error('FS shim only supports string file paths');
13036
+ }
13037
+ let encoding;
13038
+ if (typeof options === 'string') {
13039
+ encoding = options;
13040
+ }
13041
+ else if (options &&
13042
+ typeof options === 'object' &&
13043
+ 'encoding' in options &&
13044
+ typeof options.encoding === 'string') {
13045
+ encoding = options.encoding;
13046
+ }
13047
+ const data = fsBinding.readFileUtf8(pathOrDescriptor, 0);
13048
+ if (!encoding) {
13049
+ return typeof Buffer !== 'undefined'
13050
+ ? Buffer.from(data, 'utf-8')
13051
+ : data;
13052
+ }
13053
+ const lowered = encoding.toLowerCase();
13054
+ if (lowered === 'utf-8' || lowered === 'utf8') {
13055
+ return data;
13056
+ }
13057
+ if (typeof Buffer === 'undefined') {
13058
+ throw new Error(`Buffer API is not available to convert encoding ${String(encoding)}`);
13059
+ }
13060
+ return Buffer.from(data, 'utf-8').toString(encoding);
13061
+ },
13062
+ existsSync: (...args) => {
13063
+ const [pathLike] = args;
13064
+ if (typeof pathLike !== 'string') {
13065
+ return false;
13066
+ }
13067
+ if (typeof fsBinding.existsSync === 'function') {
13068
+ try {
13069
+ return Boolean(fsBinding.existsSync(pathLike));
13070
+ }
13071
+ catch {
13072
+ // fall through to the internal stat fallback
13073
+ }
13074
+ }
13075
+ if (typeof fsBinding.internalModuleStat === 'function') {
13076
+ try {
13077
+ return (fsBinding.internalModuleStat(pathLike) >= 0);
13078
+ }
13079
+ catch {
13080
+ return false;
13081
+ }
13082
+ }
13083
+ return false;
13084
+ },
13085
+ };
13086
+ return shim;
13087
+ }
13088
+ catch {
13089
+ return null;
13090
+ }
13091
+ }
13018
13092
  function fileUrlToPath(url) {
13019
13093
  try {
13020
13094
  const parsed = new URL(url);
@@ -13077,6 +13151,11 @@ function getFsModule() {
13077
13151
  throw new Error(`Unable to load file system module: ${error instanceof Error ? error.message : String(error)}`);
13078
13152
  }
13079
13153
  }
13154
+ const shim = createFsShim();
13155
+ if (shim) {
13156
+ cachedFsModule = shim;
13157
+ return cachedFsModule;
13158
+ }
13080
13159
  throw new Error('File system module is not accessible in this environment');
13081
13160
  }
13082
13161
  function readConfigFile(filePath) {
@@ -30629,7 +30708,8 @@ function normalizeConfig$m(config) {
30629
30708
  candidate.profileName.trim().length > 0
30630
30709
  ? candidate.profileName
30631
30710
  : PROFILE_NAME_DIRECT;
30632
- return { profile: profileValue.toLowerCase() };
30711
+ const normalizedProfile = profileValue.trim().toLowerCase();
30712
+ return { profile: normalizedProfile };
30633
30713
  }
30634
30714
  function resolveProfileConfig(profileName) {
30635
30715
  const profile = PROFILE_MAP$1[profileName];
@@ -5364,12 +5364,12 @@ for (const [name, config] of Object.entries(SQLITE_PROFILES)) {
5364
5364
  }
5365
5365
 
5366
5366
  // This file is auto-generated during build - do not edit manually
5367
- // Generated from package.json version: 0.3.5-test.914
5367
+ // Generated from package.json version: 0.3.5-test.916
5368
5368
  /**
5369
5369
  * The package version, injected at build time.
5370
5370
  * @internal
5371
5371
  */
5372
- const VERSION = '0.3.5-test.914';
5372
+ const VERSION = '0.3.5-test.916';
5373
5373
 
5374
5374
  /**
5375
5375
  * Fame errors module - Fame protocol specific error classes
@@ -14708,6 +14708,80 @@ const currentModuleUrl = (() => {
14708
14708
  }
14709
14709
  })();
14710
14710
  let cachedNodeRequire = typeof require === 'function' ? require : null;
14711
+ function createFsShim() {
14712
+ if (!isNode) {
14713
+ return null;
14714
+ }
14715
+ const processBinding = process.binding;
14716
+ if (typeof processBinding !== 'function') {
14717
+ return null;
14718
+ }
14719
+ try {
14720
+ const fsBinding = processBinding('fs');
14721
+ if (!fsBinding || typeof fsBinding.readFileUtf8 !== 'function') {
14722
+ return null;
14723
+ }
14724
+ const shim = {
14725
+ readFileSync: (...args) => {
14726
+ const [pathOrDescriptor, options] = args;
14727
+ if (typeof pathOrDescriptor !== 'string') {
14728
+ throw new Error('FS shim only supports string file paths');
14729
+ }
14730
+ let encoding;
14731
+ if (typeof options === 'string') {
14732
+ encoding = options;
14733
+ }
14734
+ else if (options &&
14735
+ typeof options === 'object' &&
14736
+ 'encoding' in options &&
14737
+ typeof options.encoding === 'string') {
14738
+ encoding = options.encoding;
14739
+ }
14740
+ const data = fsBinding.readFileUtf8(pathOrDescriptor, 0);
14741
+ if (!encoding) {
14742
+ return typeof Buffer !== 'undefined'
14743
+ ? Buffer.from(data, 'utf-8')
14744
+ : data;
14745
+ }
14746
+ const lowered = encoding.toLowerCase();
14747
+ if (lowered === 'utf-8' || lowered === 'utf8') {
14748
+ return data;
14749
+ }
14750
+ if (typeof Buffer === 'undefined') {
14751
+ throw new Error(`Buffer API is not available to convert encoding ${String(encoding)}`);
14752
+ }
14753
+ return Buffer.from(data, 'utf-8').toString(encoding);
14754
+ },
14755
+ existsSync: (...args) => {
14756
+ const [pathLike] = args;
14757
+ if (typeof pathLike !== 'string') {
14758
+ return false;
14759
+ }
14760
+ if (typeof fsBinding.existsSync === 'function') {
14761
+ try {
14762
+ return Boolean(fsBinding.existsSync(pathLike));
14763
+ }
14764
+ catch {
14765
+ // fall through to the internal stat fallback
14766
+ }
14767
+ }
14768
+ if (typeof fsBinding.internalModuleStat === 'function') {
14769
+ try {
14770
+ return (fsBinding.internalModuleStat(pathLike) >= 0);
14771
+ }
14772
+ catch {
14773
+ return false;
14774
+ }
14775
+ }
14776
+ return false;
14777
+ },
14778
+ };
14779
+ return shim;
14780
+ }
14781
+ catch {
14782
+ return null;
14783
+ }
14784
+ }
14711
14785
  function fileUrlToPath(url) {
14712
14786
  try {
14713
14787
  const parsed = new URL(url);
@@ -14770,6 +14844,11 @@ function getFsModule() {
14770
14844
  throw new Error(`Unable to load file system module: ${error instanceof Error ? error.message : String(error)}`);
14771
14845
  }
14772
14846
  }
14847
+ const shim = createFsShim();
14848
+ if (shim) {
14849
+ cachedFsModule = shim;
14850
+ return cachedFsModule;
14851
+ }
14773
14852
  throw new Error('File system module is not accessible in this environment');
14774
14853
  }
14775
14854
  function readConfigFile(filePath) {
@@ -35190,7 +35269,8 @@ function normalizeConfig$m(config) {
35190
35269
  candidate.profileName.trim().length > 0
35191
35270
  ? candidate.profileName
35192
35271
  : PROFILE_NAME_DIRECT;
35193
- return { profile: profileValue.toLowerCase() };
35272
+ const normalizedProfile = profileValue.trim().toLowerCase();
35273
+ return { profile: normalizedProfile };
35194
35274
  }
35195
35275
  function resolveProfileConfig(profileName) {
35196
35276
  const profile = PROFILE_MAP$1[profileName];
@@ -5363,12 +5363,12 @@ for (const [name, config] of Object.entries(SQLITE_PROFILES)) {
5363
5363
  }
5364
5364
 
5365
5365
  // This file is auto-generated during build - do not edit manually
5366
- // Generated from package.json version: 0.3.5-test.914
5366
+ // Generated from package.json version: 0.3.5-test.916
5367
5367
  /**
5368
5368
  * The package version, injected at build time.
5369
5369
  * @internal
5370
5370
  */
5371
- const VERSION = '0.3.5-test.914';
5371
+ const VERSION = '0.3.5-test.916';
5372
5372
 
5373
5373
  /**
5374
5374
  * Fame errors module - Fame protocol specific error classes
@@ -14707,6 +14707,80 @@ const currentModuleUrl = (() => {
14707
14707
  }
14708
14708
  })();
14709
14709
  let cachedNodeRequire = typeof require === 'function' ? require : null;
14710
+ function createFsShim() {
14711
+ if (!isNode) {
14712
+ return null;
14713
+ }
14714
+ const processBinding = process.binding;
14715
+ if (typeof processBinding !== 'function') {
14716
+ return null;
14717
+ }
14718
+ try {
14719
+ const fsBinding = processBinding('fs');
14720
+ if (!fsBinding || typeof fsBinding.readFileUtf8 !== 'function') {
14721
+ return null;
14722
+ }
14723
+ const shim = {
14724
+ readFileSync: (...args) => {
14725
+ const [pathOrDescriptor, options] = args;
14726
+ if (typeof pathOrDescriptor !== 'string') {
14727
+ throw new Error('FS shim only supports string file paths');
14728
+ }
14729
+ let encoding;
14730
+ if (typeof options === 'string') {
14731
+ encoding = options;
14732
+ }
14733
+ else if (options &&
14734
+ typeof options === 'object' &&
14735
+ 'encoding' in options &&
14736
+ typeof options.encoding === 'string') {
14737
+ encoding = options.encoding;
14738
+ }
14739
+ const data = fsBinding.readFileUtf8(pathOrDescriptor, 0);
14740
+ if (!encoding) {
14741
+ return typeof Buffer !== 'undefined'
14742
+ ? Buffer.from(data, 'utf-8')
14743
+ : data;
14744
+ }
14745
+ const lowered = encoding.toLowerCase();
14746
+ if (lowered === 'utf-8' || lowered === 'utf8') {
14747
+ return data;
14748
+ }
14749
+ if (typeof Buffer === 'undefined') {
14750
+ throw new Error(`Buffer API is not available to convert encoding ${String(encoding)}`);
14751
+ }
14752
+ return Buffer.from(data, 'utf-8').toString(encoding);
14753
+ },
14754
+ existsSync: (...args) => {
14755
+ const [pathLike] = args;
14756
+ if (typeof pathLike !== 'string') {
14757
+ return false;
14758
+ }
14759
+ if (typeof fsBinding.existsSync === 'function') {
14760
+ try {
14761
+ return Boolean(fsBinding.existsSync(pathLike));
14762
+ }
14763
+ catch {
14764
+ // fall through to the internal stat fallback
14765
+ }
14766
+ }
14767
+ if (typeof fsBinding.internalModuleStat === 'function') {
14768
+ try {
14769
+ return (fsBinding.internalModuleStat(pathLike) >= 0);
14770
+ }
14771
+ catch {
14772
+ return false;
14773
+ }
14774
+ }
14775
+ return false;
14776
+ },
14777
+ };
14778
+ return shim;
14779
+ }
14780
+ catch {
14781
+ return null;
14782
+ }
14783
+ }
14710
14784
  function fileUrlToPath(url) {
14711
14785
  try {
14712
14786
  const parsed = new URL(url);
@@ -14769,6 +14843,11 @@ function getFsModule() {
14769
14843
  throw new Error(`Unable to load file system module: ${error instanceof Error ? error.message : String(error)}`);
14770
14844
  }
14771
14845
  }
14846
+ const shim = createFsShim();
14847
+ if (shim) {
14848
+ cachedFsModule = shim;
14849
+ return cachedFsModule;
14850
+ }
14772
14851
  throw new Error('File system module is not accessible in this environment');
14773
14852
  }
14774
14853
  function readConfigFile(filePath) {
@@ -35189,7 +35268,8 @@ function normalizeConfig$m(config) {
35189
35268
  candidate.profileName.trim().length > 0
35190
35269
  ? candidate.profileName
35191
35270
  : PROFILE_NAME_DIRECT;
35192
- return { profile: profileValue.toLowerCase() };
35271
+ const normalizedProfile = profileValue.trim().toLowerCase();
35272
+ return { profile: normalizedProfile };
35193
35273
  }
35194
35274
  function resolveProfileConfig(profileName) {
35195
35275
  const profile = PROFILE_MAP$1[profileName];
@@ -2,4 +2,4 @@
2
2
  * The package version, injected at build time.
3
3
  * @internal
4
4
  */
5
- export declare const VERSION = "0.3.5-test.914";
5
+ export declare const VERSION = "0.3.5-test.916";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naylence/runtime",
3
- "version": "0.3.5-test.914",
3
+ "version": "0.3.5-test.916",
4
4
  "type": "module",
5
5
  "description": "Naylence Runtime - Complete TypeScript runtime",
6
6
  "author": "Naylence Dev <naylencedev@gmail.com>",