theprogrammablemind_4wp 7.5.8-beta.51 → 7.5.8-beta.52
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.
- package/client.js +1 -1
 - package/package.json +1 -1
 - package/src/config.js +22 -20
 
    
        package/client.js
    CHANGED
    
    | 
         @@ -1491,7 +1491,7 @@ const knowledgeModule = async ({ 
     | 
|
| 
       1491 
1491 
     | 
    
         | 
| 
       1492 
1492 
     | 
    
         
             
              if (!isProcess) {
         
     | 
| 
       1493 
1493 
     | 
    
         
             
                if (template) {
         
     | 
| 
       1494 
     | 
    
         
            -
                  if (config.needsRebuild(template.template, template.instance)) {
         
     | 
| 
      
 1494 
     | 
    
         
            +
                  if (config.needsRebuild(template.template, template.instance, { isTemplate: !isProcess })) {
         
     | 
| 
       1495 
1495 
     | 
    
         
             
                    const error = `This module "${config.name}" cannot be used because the instance file needs rebuilding. Run on the command line with no arguments or the -rt argument to rebuild.`
         
     | 
| 
       1496 
1496 
     | 
    
         
             
                    throw new Error(error)
         
     | 
| 
       1497 
1497 
     | 
    
         
             
                  }
         
     | 
    
        package/package.json
    CHANGED
    
    
    
        package/src/config.js
    CHANGED
    
    | 
         @@ -919,7 +919,7 @@ class Config { 
     | 
|
| 
       919 
919 
     | 
    
         
             
                }
         
     | 
| 
       920 
920 
     | 
    
         
             
              }
         
     | 
| 
       921 
921 
     | 
    
         | 
| 
       922 
     | 
    
         
            -
              needsRebuild(template, instance, options = { rebuild: false }) {
         
     | 
| 
      
 922 
     | 
    
         
            +
              needsRebuild(template, instance, options = { rebuild: false, isModule: false }) {
         
     | 
| 
       923 
923 
     | 
    
         
             
                if (options.rebuild) {
         
     | 
| 
       924 
924 
     | 
    
         
             
                  return true
         
     | 
| 
       925 
925 
     | 
    
         
             
                }
         
     | 
| 
         @@ -939,21 +939,27 @@ class Config { 
     | 
|
| 
       939 
939 
     | 
    
         
             
                    return query
         
     | 
| 
       940 
940 
     | 
    
         
             
                  } else {
         
     | 
| 
       941 
941 
     | 
    
         
             
                    const config = { ...queryOrConfig }
         
     | 
| 
       942 
     | 
    
         
            -
                     
     | 
| 
       943 
     | 
    
         
            -
             
     | 
| 
       944 
     | 
    
         
            -
                       
     | 
| 
       945 
     | 
    
         
            -
                      delete  
     | 
| 
       946 
     | 
    
         
            -
             
     | 
| 
       947 
     | 
    
         
            -
                       
     | 
| 
       948 
     | 
    
         
            -
                       
     | 
| 
       949 
     | 
    
         
            -
             
     | 
| 
       950 
     | 
    
         
            -
             
     | 
| 
       951 
     | 
    
         
            -
             
     | 
| 
       952 
     | 
    
         
            -
             
     | 
| 
       953 
     | 
    
         
            -
             
     | 
| 
       954 
     | 
    
         
            -
                       
     | 
| 
       955 
     | 
    
         
            -
                       
     | 
| 
       956 
     | 
    
         
            -
             
     | 
| 
      
 942 
     | 
    
         
            +
                    if (options.isModule) {
         
     | 
| 
      
 943 
     | 
    
         
            +
                      // things like webpack rewrite the functions if there are constants so this compare does not work
         
     | 
| 
      
 944 
     | 
    
         
            +
                      delete config.generators
         
     | 
| 
      
 945 
     | 
    
         
            +
                      delete config.semantics
         
     | 
| 
      
 946 
     | 
    
         
            +
                    } else {
         
     | 
| 
      
 947 
     | 
    
         
            +
                      delete config.where
         
     | 
| 
      
 948 
     | 
    
         
            +
                      config.generators = (config.generators || []).map((generator) => {
         
     | 
| 
      
 949 
     | 
    
         
            +
                        generator = {...generator}
         
     | 
| 
      
 950 
     | 
    
         
            +
                        delete generator.where
         
     | 
| 
      
 951 
     | 
    
         
            +
                        generator.match = generator.match.toString()
         
     | 
| 
      
 952 
     | 
    
         
            +
                        generator.apply = generator.apply.toString()
         
     | 
| 
      
 953 
     | 
    
         
            +
                        return generator
         
     | 
| 
      
 954 
     | 
    
         
            +
                      })
         
     | 
| 
      
 955 
     | 
    
         
            +
                      config.semantics = (config.semantics || []).map((semantic) => {
         
     | 
| 
      
 956 
     | 
    
         
            +
                        semantic = {...semantic}
         
     | 
| 
      
 957 
     | 
    
         
            +
                        delete semantic.where
         
     | 
| 
      
 958 
     | 
    
         
            +
                        semantic.match = semantic.match.toString()
         
     | 
| 
      
 959 
     | 
    
         
            +
                        semantic.apply = semantic.apply.toString()
         
     | 
| 
      
 960 
     | 
    
         
            +
                        return semantic
         
     | 
| 
      
 961 
     | 
    
         
            +
                      })
         
     | 
| 
      
 962 
     | 
    
         
            +
                    }
         
     | 
| 
       957 
963 
     | 
    
         
             
                    return config
         
     | 
| 
       958 
964 
     | 
    
         
             
                  }
         
     | 
| 
       959 
965 
     | 
    
         
             
                }
         
     | 
| 
         @@ -962,10 +968,6 @@ class Config { 
     | 
|
| 
       962 
968 
     | 
    
         
             
                }
         
     | 
| 
       963 
969 
     | 
    
         | 
| 
       964 
970 
     | 
    
         
             
                const sameQueries = helpers.safeEquals(toCanonicalQueries(template.queries || []).map(helpers.updateQueries), toCanonicalQueries(instance.queries || []))
         
     | 
| 
       965 
     | 
    
         
            -
                // greg99
         
     | 
| 
       966 
     | 
    
         
            -
                console.log("sameQueries", sameQueries)
         
     | 
| 
       967 
     | 
    
         
            -
                console.log('template.queries', toCanonicalQueries(template.queries || []).map(helpers.updateQueries))
         
     | 
| 
       968 
     | 
    
         
            -
                console.log('instance.queries', toCanonicalQueries(instance.queries || []))
         
     | 
| 
       969 
971 
     | 
    
         
             
                return !(instance && sameQueries && sameFragments)
         
     | 
| 
       970 
972 
     | 
    
         
             
              }
         
     | 
| 
       971 
973 
     | 
    
         |