@lowdefy/build 0.0.0-experimental-20231123124425 → 0.0.0-experimental-20240115131502

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.
@@ -16,19 +16,22 @@
16
16
  import buildAuthPlugins from './buildAuthPlugins.js';
17
17
  import buildPageAuth from './buildPageAuth.js';
18
18
  import validateAuthConfig from './validateAuthConfig.js';
19
+ let warningLogged = false;
19
20
  function buildAuth({ components, context }) {
20
21
  const configured = !type.isNone(components.auth);
21
22
  if (configured && !context.entitlements.includes('AUTH')) {
22
- // TODO: Warning message
23
- context.logger.warn(`
24
- ---------------------------------------------------
25
- Authentication configured without a license key.
26
-
27
- Paid features can not be used in production
28
- without a valid license.
29
-
30
- See https://lowdefy.com/license-faqs.
31
- ---------------------------------------------------`);
23
+ if (!warningLogged) {
24
+ context.logger.warn(`
25
+ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
26
+ Authentication configured without a license key.
27
+ ┠──────────────────────────────────────────────────┨
28
+ Paid features can not be used in production
29
+ without a valid license.
30
+ ┃ ┃
31
+ See https://docs.lowdefy.com/licenses.
32
+ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛`);
33
+ warningLogged = true;
34
+ }
32
35
  }
33
36
  validateAuthConfig({
34
37
  components
@@ -19,6 +19,9 @@ function buildTypeClass(context, { counter, definitions, store, typeClass, warnI
19
19
  Object.keys(counts).forEach((typeName)=>{
20
20
  if (!definitions[typeName]) {
21
21
  if (warnIfMissing) {
22
+ if (typeName === '_id') {
23
+ return;
24
+ }
22
25
  context.logger.warn(`${typeClass} type "${typeName}" was used but is not defined.`);
23
26
  return;
24
27
  }
@@ -41,7 +44,12 @@ function buildTypes({ components, context }) {
41
44
  // Add loaders and basic
42
45
  basicTypes.blocks.forEach((block)=>typeCounters.blocks.increment(block));
43
46
  loaderTypes.blocks.forEach((block)=>typeCounters.blocks.increment(block));
44
- typeCounters.blocks.increment('Message'); // Used for DisplayMessage in @lowdefy/client
47
+ // Used for DisplayMessage in @lowdefy/client
48
+ typeCounters.blocks.increment('Message');
49
+ // Used by license-invalid page
50
+ typeCounters.blocks.increment('Button');
51
+ typeCounters.blocks.increment('Result');
52
+ typeCounters.operators.client.increment('_get');
45
53
  components.types = {
46
54
  actions: {},
47
55
  auth: {